pyeeg.features.syntactic_features.ParserConfig
- class pyeeg.features.syntactic_features.ParserConfig(parser_name: str = 'stanford', parser_path: str | None = None, model_path: str | None = None, language: str = 'en', timeout: int = 30)
Configuration for the external constituency parser.
- Parameters:
parser_name (str) – Name of the parser to use:
"stanford"or"alpino". Default:"stanford".parser_path (str, optional) – Path to the parser binary or jar file (e.g.
stanford-parser.jar). Used bySyntacticFeatureExtractor.get_stanford_tree()when no explicit path is given. Default:None.model_path (str, optional) – Path to the parser model file. Currently unused by the extraction methods, which rely on the
STANFORD_MODELSenvironment variable. Default:None.language (str) – Language of the input text, passed to
nltk.sent_tokenize(supported:"en","nl","fr", or any language code understood by NLTK). Default:"en".timeout (int) – Timeout in seconds for parser calls. Reserved for parser backends that support timeouts; not currently enforced by the extraction methods. Default: 30.