langchain_community.callbacks.mlflow_callback
.analyze_text¶
- langchain_community.callbacks.mlflow_callback.analyze_text(text: str, nlp: Optional[Any] = None, textstat: Optional[Any] = None) dict [source]¶
Analyze text using textstat and spacy.
- Parameters
text (str) – The text to analyze.
nlp (spacy.lang) – The spacy language model to use for visualization.
textstat (Optional[Any]) – The textstat library to use for complexity metrics calculation.
- Returns
- A dictionary containing the complexity metrics and visualization
files serialized to HTML string.
- Return type
(dict)