Closed Luakika closed 1 year ago
There's no functionality to group multiple documents together in the context display. The example from readme shows results different matches for the word "we" in the same document.
If you'd like Scattertext to display results differently, I'm happy to review a PR with the change.
Hi,
The html visualization is having trouble grouping documents by their metadata values. Is there a way to fix this?
Steps to Reproduce
I'm working with a pandas dataframe with 2233 rows of small document text data and a category variable with 12 values.
Run: html = st.produce_scattertext_explorer(corpus, category='positive', category_name='Positive', not_category_name='Negative', width_in_pixels=1000, metadata=corpus.get_df()['reasonFactor'])
Metadata: Name: reasonFactor, Length: 2233, dtype: category Categories (12, object): [...]
Expected behavior
Error Example: The blue values repeat categorical variables and documents instead of grouping them.![scatterTextError](https://user-images.githubusercontent.com/61434949/202259247-6084b673-cf59-42eb-8134-5873cc05ad6c.png)
Correct behavior example from scattertextREADME.md![scatterTextCorrect](https://user-images.githubusercontent.com/61434949/202049362-0229e804-2310-42f8-9a3d-cd4a060d3148.PNG)