pyeeg.features.SyntacticFeatureExtractor.extract_to_dict
- SyntacticFeatureExtractor.extract_to_dict(text: str, features: List[str] = None) Dict[str, Dict[int, float]]
Extract features and return as word position -> value dict.
Convenience wrapper around
extract()that converts each per-word value list into a mapping from word position (0-based index in the tokenized text) to the feature value as a float. Suitable for input topyeeg.features.alignment.AlignmentHandler.align_word_features().- Parameters:
- Returns:
result – Mapping from feature name to a dict of word position -> feature value, with one entry per word.
- Return type:
dict of str -> dict of int -> float