produce_characteristic_explorer for non-English-language Corpus #83
-
Hi, I was trying to use
Is it possible to specify a non-English-language frequency list in Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Edoardo, This is still a bit experimental and inelegant (like of Scattertext), but you can pass a subclass of You can see an example of this in https://github.com/JasonKessler/scattertext/blob/5af28c8860d718feb9da1d24c3cb698a946b9c70/scattertext/characteristic/DenseRankCharacteristicness.py In short, your subclass should implement a
Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi Edoardo,
This is still a bit experimental and inelegant (like of Scattertext), but you can pass a subclass of
CharacteristicScorer
into thecharacteristic_scorer
parameter ofproduce_scattertext_explorer
(or any similar function).You can see an example of this in https://github.com/JasonKessler/scattertext/blob/5af28c8860d718feb9da1d24c3cb698a946b9c70/scattertext/characteristic/DenseRankCharacteristicness.py
In short, your subclass should implement a
get_scores(self, corpus)
method which should return a tuple consisting of:pd.Series
which is indexed on each term in the corpus (e.g…