Show actual reviews, but use a different text column in the corpus creation #96
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am using the ScatterText plot the keywords extracted from different reviews. But instead of using the actual review text, I am using another column in the dataframe, called 'key_text' which is basically a string made by concatenating the top 3 keywords extracted from a review. Like if the keywords extracted for a review are 'wait', 'come' and 'go', then the corresponding string will be 'wait come go'. The keywords are extracted using a different algorithm, i.e., I am not using the inbuilt Spacy model for keyword extraction.
But when I search for a term in the ScatterText plot, the texts present in 'key_text' column is displayed, corresponding to that search term in the corpus.
corpus = scattertext.CorpusFromPandas(data, category_col = 'Category', text_col = 'key_text', nlp = nlp).build()
.remove_terms(nlp.Defaults.stop_words, ignore_absences = True)
Regards.
Beta Was this translation helpful? Give feedback.
All reactions