Comments (5)
I can't replicate this. How did you install the package?
Also, make sure that there's not file or folder named "scattertext.py" or "scattertext" in your working directory.
from scattertext.
I used pip.
Here is the error I am getting now that I removed the scattertext.pyc file from the cwd:
Traceback (most recent call last):
File "stextt.py", line 13, in <module>
filtered_term_doc_mat = (ST.TermDocMatrixFilter(pmi_threshold_coef = 3, min_freq = 10).filter(term_doc_mat))
TypeError: __init__() got an unexpected keyword argument 'min_freq'
I will look into the code later today. Thanks for responding so quickly!
from scattertext.
Ah. Looks like I forgot to update the param name in the example after changing it in a new version. I'll go ahead and change it, but use minimum_term_freq instead of min_freq.
from scattertext.
Okay, I changed the parameter name to minimum_term_freq instead of min_freq and reran the code and got the following error:
iMac:Desktop shyamalsuhanachandra$ python stextt.py
Traceback (most recent call last):
File "stextt.py", line 15, in <module>
scatter_chart_data = (ST.ScatterChart(filtered_term_doc_mat).to_dict('text1', category_name='text1', not_category_name='text2'))
File "/usr/local/lib/python2.7/site-packages/scattertext/ScatterChart.py", line 61, in to_dict
df = self._build_dataframe_for_drawing(all_categories, category, scores)
File "/usr/local/lib/python2.7/site-packages/scattertext/ScatterChart.py", line 188, in _build_dataframe_for_drawing
df[df[all_categories].sum(axis=1) > self.minimum_term_frequency],
File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 1991, in __getitem__
return self._getitem_array(key)
File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 2035, in _getitem_array
indexer = self.ix._convert_to_indexer(key, axis=1)
File "/usr/local/lib/python2.7/site-packages/pandas/core/indexing.py", line 1214, in _convert_to_indexer
raise KeyError('%s not in index' % objarr[mask])
KeyError: "['text1 freq'] not in index"
Any thoughts?
from scattertext.
I changed the names to text1 and text2 and it runs successfully.
from scattertext.
Related Issues (20)
- AttributeError in plotting scattertext HOT 1
- saving to HTML breaks encoding HOT 2
- Is it possible to remove stopwords without Spacy? HOT 1
- How to have the Scattertext without showing collocation? HOT 1
- How to list the words according to the color or the range of the scores? HOT 1
- Corpus size too large HOT 1
- Lack of words in one category HOT 1
- How to make points in the chart bigger? HOT 3
- Stopwords not working HOT 1
- How can I use custom stopword list
- Scattertext 0.1.8 requires spacy HOT 1
- Visualization is not grouping documents by metadata value. HOT 1
- Simple Example uses non-existent PMI argument HOT 2
- scattertext breaks with scikit-learn 1.2.0 HOT 1
- Error while trying to install scattertext in Google Colab via pip/pip3 HOT 3
- Labeling Issue during visualization of Scaled F-Score HOT 2
- good colab runtime stops when trying to upload own video
- Suggestion for improving UX - positioning of elements HOT 1
- Does ScatterText somehow combine tokens? HOT 5
- Textrank example fails: 'numpy.ndarray' object has no attribute 'loc'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scattertext.