pyeeg.features.SyntacticFeatureExtractor.parse_text

SyntacticFeatureExtractor.parse_text(text: str) List[None]

Parse text into constituency trees.

Tokenizes the text into sentences (using the language configured in config.language) and parses each sentence with the parser named in config.parser_name.

Parameters:

text (str) – Input text to parse, containing one or more sentences.

Returns:

trees – One parse tree per sentence, in sentence order.

Return type:

list of nltk.tree.Tree

Raises:

ValueError – If config.parser_name is not "stanford" or "alpino".