original_docstring: 
      Resolve birth and death dates from infoboxes, or, if it is not found,
      from the first paragraph
      
docstring: Resolve birth and death dates from infoboxes, or, if it is not found,
  from the first paragraph
docstring_tokens: Resolve birth and death dates from infoboxes or if it is not found from the first paragraph
code: def find_date(symbol, date_type):
      """
      Resolve birth and death dates from infoboxes, or, if it is not found,
      from the first paragraph
      """
      for cls in InfoboxClassifier().classify(symbol):
          ibox_date = InfoboxResolver().resolve_infobox(cls, symbol, date_type)
          if ibox_date is not None:
              return ibox_date
  
      # TODO: look at categories for dates
  
      article = get_article(symbol)
      text = article.paragraphs()[0]  # the first paragraph
      for s, e in iter_paren(text, "."):
          paren = text[s:e]
  
          for ovl in overlay_parse.dates.just_ranges(paren):
              if date_type == 'birth-date':
                  return lispify(ovl[0], typecode='yyyymmdd')
              elif date_type == 'death-date':
                  return lispify(ovl[1], typecode='yyyymmdd')
  
          # If there is just one date and we need a birth date, get that
          if date_type == 'birth-date':
              for ovl in overlay_parse.dates.just_dates(paren):
                  return lispify(ovl, typecode='yyyymmdd')
code_tokens: def find_date ( symbol , date_type ) : for cls in InfoboxClassifier ( ) . classify ( symbol ) : ibox_date = InfoboxResolver ( ) . resolve_infobox ( cls , symbol , date_type ) if ibox_date is not None : return ibox_date article = get_article ( symbol ) text = article . paragraphs ( ) [ 0 ] for s , e in iter_paren ( text , "." ) : paren = text [ s : e ] for ovl in overlay_parse . dates . just_ranges ( paren ) : if date_type == 'birth-date' : return lispify ( ovl [ 0 ] , typecode = 'yyyymmdd' ) elif date_type == 'death-date' : return lispify ( ovl [ 1 ] , typecode = 'yyyymmdd' ) if date_type == 'birth-date' : for ovl in overlay_parse . dates . just_dates ( paren ) : return lispify ( ovl , typecode = 'yyyymmdd' )
short_docstring: Resolve birth and death dates from infoboxes, or, if it is not found,
  from the first paragraph
short_docstring_tokens: Resolve birth and death dates from infoboxes or if it is not found from the first paragraph
comment: """
      Resolve birth and death dates from infoboxes, or, if it is not found,
      from the first paragraph
      """$SEP$# TODO: look at categories for dates$SEP$# the first paragraph$SEP$# If there is just one date and we need a birth date, get that