JasonKessler / scattertext

Beautiful visualizations of how language differs among document types.
Apache License 2.0
2.23k stars 287 forks source link

No metadata is present in the term document matrix with Topic Model #67

Closed MastafaF closed 3 years ago

MastafaF commented 3 years ago

Hi,

I am replicating line by line the example with Topic List of words from demo_word_list_topic_model.py .

Here is the error message in python:

Traceback (most recent call last):
  File "demo_word_topic_list_model.py", line 27, in <module>
    html = st.produce_scattertext_explorer(
  File "C:\Users\xxxxxxxx\anaconda3\envs\xxxxxxx\lib\site-packages\scattertext\__init__.py", line 487, in produce_scattertext_explorer
    scatter_chart_explorer.inject_metadata_term_lists(topic_model_term_lists)
  File "C:\Users\xxxxxxxx\anaconda3\envs\xxxxxxxx\lib\site-packages\scattertext\ScatterChart.py", line 104, in inject_metadata_term_lists
    raise TermDocMatrixHasNoMetadataException("No metadata is present in the term document matrix")
scattertext.ScatterChart.TermDocMatrixHasNoMetadataException: No metadata is present in the term document matrix

Your Environment

JasonKessler commented 3 years ago

I'm pushing a new version, 0.0.2.68 which should correct this issue. Please update your version and try again.

MastafaF commented 3 years ago

Works great now, thanks!!