class_docstr: A class representing the annotations available for a single CONLL formatted sentence.
  
  Parameters
  ----------
  document_id : ``str``
      This is a variation on the document filename
  sentence_id : ``int``
      The integer ID of the sentence within a document.
  words : ``List[str]``
      This is the tokens as segmented/tokenized in the Treebank.
  pos_tags : ``List[str]``
      This is the Penn-Treebank-style part of speech. When parse information is missing,
      all parts of speech except the one for which there is some sense or proposition
      annotation are marked with a XX tag. The verb is marked with just a VERB tag.
  parse_tree : ``nltk.Tree``
      An nltk Tree representing the parse. It includes POS tags as pre-terminal nodes.
      When the parse information is missing, the parse will be ``None``.
  predicate_lemmas : ``List[Optional[str]]``
      The predicate lemma of the words for which we have semantic role
      information or word sense information. All other indices are ``None``.
  predicate_framenet_ids : ``List[Optional[int]]``
      The PropBank frameset ID of the lemmas in ``predicate_lemmas``, or ``None``.
  word_senses : ``List[Optional[float]]``
      The word senses for the words in the sentence, or ``None``. These are floats
      because the word sense can have values after the decimal, like ``1.1``.
  speakers : ``List[Optional[str]]``
      The speaker information for the words in the sentence, if present, or ``None``
      This is the speaker or author name where available. Mostly in Broadcast Conversation
      and Web Log data. When not available the rows are marked with an "-".
  named_entities : ``List[str]``
      The BIO tags for named entities in the sentence.
  srl_frames : ``List[Tuple[str, List[str]]]``
      A dictionary keyed by the verb in the sentence for the given
      Propbank frame labels, in a BIO format.
  coref_spans : ``Set[TypedSpan]``
      The spans for entity mentions involved in coreference resolution within the sentence.
      Each element is a tuple composed of (cluster_id, (start_index, end_index)). Indices
      are `inclusive`.
class_docstr_tok: ["A","class","representing","the","annotations","available","for","a","single","CONLL","formatted","sentence",".","Parameters","--","--","--","--","--","document_id",":","``","str","``","This","is","a","variation","on","the","document","filename","sentence_id",":","``","int","``","The","integer","ID","of","the","sentence","within","a","document",".","words",":","``","List","[","str","]","``","This","is","the","tokens","as","segmented\/tokenized","in","the","Treebank",".","pos_tags",":","``","List","[","str","]","``","This","is","the","Penn-Treebank-style","part","of","speech",".","When","parse","information","is","missing",",","all","parts","of","speech","except","the","one","for","which","there","is","some","sense","or","proposition","annotation","are","marked","with","a","XX","tag",".","The","verb","is","marked","with","just","a","VERB","tag",".","parse_tree",":","``","nltk.Tree","``","An","nltk","Tree","representing","the","parse",".","It","includes","POS","tags","as","pre-terminal","nodes",".","When","the","parse","information","is","missing",",","the","parse","will","be","``","None","``",".","predicate_lemmas",":","``","List","[","Optional","[","str","]","]","``","The","predicate","lemma","of","the","words","for","which","we","have","semantic","role","information","or","word","sense","information",".","All","other","indices","are","``","None","``",".","predicate_framenet_ids",":","``","List","[","Optional","[","int","]","]","``","The","PropBank","frameset","ID","of","the","lemmas","in","``","predicate_lemmas","``",",","or","``","None","``",".","word_senses",":","``","List","[","Optional","[","float","]","]","``","The","word","senses","for","the","words","in","the","sentence",",","or","``","None","``",".","These","are","floats","because","the","word","sense","can","have","values","after","the","decimal",",","like","``","1.1","``",".","speakers",":","``","List","[","Optional","[","str","]","]","``","The","speaker","information","for","the","words","in","the","sentence",",","if","present",",","or","``","None","``","This","is","the","speaker","or","author","name","where","available",".","Mostly","in","Broadcast","Conversation","and","Web","Log","data",".","When","not","available","the","rows","are","marked","with","an","``","-","''",".","named_entities",":","``","List","[","str","]","``","The","BIO","tags","for","named","entities","in","the","sentence",".","srl_frames",":","``","List","[","Tuple","[","str",",","List","[","str","]","]","]","``","A","dictionary","keyed","by","the","verb","in","the","sentence","for","the","given","Propbank","frame","labels",",","in","a","BIO","format",".","coref_spans",":","``","Set","[","TypedSpan","]","``","The","spans","for","entity","mentions","involved","in","coreference","resolution","within","the","sentence",".","Each","element","is","a","tuple","composed","of","(","cluster_id",",","(","start_index",",","end_index",")",")",".","Indices","are","`","inclusive","`","."]
code: def __init__(
      self,
      document_id,
      sentence_id,
      words,
      pos_tags,
      parse_tree,
      predicate_lemmas,
      predicate_framenet_ids,
      word_senses,
      speakers,
      named_entities,
      srl_frames,
      coref_spans,
  ):
      self.document_id = document_id
      self.sentence_id = sentence_id
      self.words = words
      self.pos_tags = pos_tags
      self.parse_tree = parse_tree
      self.predicate_lemmas = predicate_lemmas
      self.predicate_framenet_ids = predicate_framenet_ids
      self.word_senses = word_senses
      self.speakers = speakers
      self.named_entities = named_entities
      self.srl_frames = srl_frames
      self.coref_spans = coref_spans
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/dataset_readers/dataset_utils/ontonotes.py
imports: from __future__ import with_statement
  from __future__ import absolute_import
  from collections import defaultdict
  import codecs
  import os
  import logging
  from nltk import Tree
label_desc: Use image node_id 1 to create a new OntonotesSentence object from inherited base classes: object with example: obj = OntonotesSentence(document_id, sentence_id, words, pos_tags, parse_tree, predicate_lemmas, predicate_framenet_ids, word_senses, speakers, named_entities, srl_frames, coref_spans)