JasonKessler / scattertext

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

max_snippets parameter for produce_scattertext_explorer non-functional #58

Closed jmbanda closed 4 years ago

jmbanda commented 4 years ago

I am trying to not have the package produce any text snippets since I can't share the text being analyzed. When using max_snippets=0, nothing happens and the snippets continue to appear. The parameter seems to not be doing anything. I try max_documents=0, but this makes all the document statistics disappear.

Thanks in advance!

JasonKessler commented 4 years ago

Thanks for the bug report. I need to clean up the way document text is handled.

In the mean time, upgrade to the latest version of Scattertext (>=0.0.2.64) and use max_docs_per_category=0 as a parameter to produce_scattertext_explorer. You'll see that term statistics show up, despite no documents being included anywhere in the visualization code.

For a working example, please see https://github.com/JasonKessler/scattertext/blob/master/demo_compact_suppress_documents.py