JasonKessler / scattertext

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

Display only the beginning of text #29

Closed arugola closed 6 years ago

arugola commented 6 years ago

Sometime documents can be long. Would it be possible to reduce the text shown below the search box or is there a simple workaround for it?

JasonKessler commented 6 years ago

You can use the max_docs_per_category=N argument of produced_scattertext_explorer (and related functions) where N is the maximum number of documents that will be included in the visualization for a particular category.

There's a bug in the implementation where clicking on a term that isn't present in one of those documents will result in no term context being shown.

arugola commented 6 years ago

I was not clear in my previous question. I'd like to use all documents, no problem on that. However, scattertext display the entire text, whereas I would like only the beginning of each document show up.