pyeeg.features.pipeline.FeatureSpec

class pyeeg.features.pipeline.FeatureSpec(name: str, extractor_type: str, features: List[str] = <factory>, config: Dict | None = None)

Specification for a feature to be extracted.

name

Unique name of the extractor within the pipeline. Also used as a prefix for the keys of the extracted features ("{name}_{feature}").

Type:

str

extractor_type

Type of the extractor to instantiate. One of "llm" (LLMFeatureExtractor) or "syntactic" (SyntacticFeatureExtractor).

Type:

str

features

Names of the individual features to extract from this extractor. For LLM extractors these are e.g. "surprisal", "entropy", "kl_divergence", "prediction_error", or "tokens"; for syntactic extractors e.g. "depth", "opening", "closing", or "tree_height". Defaults to an empty list (extractor defaults apply).

Type:

list of str

config

Optional per-extractor configuration. For "llm": model_name and device; for "syntactic": parser_name and language. Defaults to None.

Type:

dict or None, optional

Methods