class documentation

An interface to Stanford taggers. Subclasses must define:

  • _cmd property: A property that returns the command that will be executed.
  • _SEPARATOR: Class constant that represents that character that is used to separate the tokens from their tags.
  • _JAR file: Class constant that represents the jar file name.
Method __init__ Undocumented
Method parse_output Undocumented
Method tag Determine the most appropriate tag sequence for the given token sequence, and return a corresponding list of tagged tokens. A tagged token is encoded as a tuple (token, tag).
Method tag_sents Apply self.tag() to each element of sentences. I.e.:
Instance Variable java_options Undocumented
Constant _JAR Undocumented
Constant _SEPARATOR Undocumented
Instance Variable _encoding Undocumented
Instance Variable _input_file_path Undocumented
Instance Variable _stanford_jar Undocumented
Instance Variable _stanford_model Undocumented
Property _cmd A property that returns the command that will be executed.

Inherited from TaggerI:

Method evaluate Score the accuracy of the tagger against the gold standard. Strip the tags from the gold standard text, retag it using the tagger, then compute the accuracy score.
Method _check_params Undocumented
def __init__(self, model_filename, path_to_jar=None, encoding='utf8', verbose=False, java_options='-mx1000m'): (source)
def parse_output(self, text, sentences=None): (source)

Undocumented

def tag(self, tokens): (source)

Determine the most appropriate tag sequence for the given token sequence, and return a corresponding list of tagged tokens. A tagged token is encoded as a tuple (token, tag).

Returns
list(tuple(str, str))Undocumented
def tag_sents(self, sentences): (source)

Apply self.tag() to each element of sentences. I.e.:

return [self.tag(sent) for sent in sentences]
java_options = (source)

Undocumented

_encoding = (source)

Undocumented

_input_file_path = (source)

Undocumented

_stanford_jar = (source)

Undocumented

_stanford_model = (source)

Undocumented

@property
@abstractmethod
_cmd = (source)

A property that returns the command that will be executed.