Analyze text using textstat and spacy.
analyze_text(
text: str,
complexity_metrics: bool = True,
visualize: bool = True,
nlp: Any = None,
output_dir: Optional[Union[str, Path]] = None
) -> dict| Name | Type | Description |
|---|---|---|
text* | str | The text to analyze. |
complexity_metrics | bool | Default: TrueWhether to compute complexity metrics. |
visualize | bool | Default: TrueWhether to visualize the text. |
nlp | spacy.lang | Default: NoneThe spacy language model to use for visualization. |
output_dir | str | Default: NoneThe directory to save the visualization files to. |