aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.28k stars 337 forks source link

ValueError: Package 'sentiment2.un' not found in index #235

Open serenalyoko opened 3 years ago

serenalyoko commented 3 years ago

Hi I am trying to use the Text module with sentiment2.en. However, after I downloaded sentiment2.en, it asks me to download sentiment2.un. When I attempted to download sentiment2.un, it told me package not found in index

[polyglot_data] Error loading sentiment2.un: Package 'sentiment2.un' [polyglot_data] not found in index Error installing package. Retry? [n/y/e] y Traceback (most recent call last): File "/usr/local/bin/polyglot", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/polyglot/__main__.py", line 292, in main args.func(args) File "/usr/local/lib/python3.9/site-packages/polyglot/__main__.py", line 114, in download rv = downloader.download(info_or_id=unicode(pkg_id), download_dir=args.dir, File "/usr/local/lib/python3.9/site-packages/polyglot/downloader.py", line 676, in download if not self.download(msg.package.id, download_dir, AttributeError: 'NoneType' object has no attribute 'id'

siyizhou@Siyis-MBP code2 % python3 Pos_Neg.py Traceback (most recent call last): File "/Users/siyizhou/Documents/2020Fall/COMMresearch/code2/Pos_Neg.py", line 48, in <module> pol = w.polarity File "/usr/local/lib/python3.9/site-packages/polyglot/text.py", line 320, in polarity embeddings = load_embeddings(lang=self.language, type="", task="sentiment") File "/usr/local/lib/python3.9/site-packages/polyglot/decorators.py", line 30, in memoizer cache[key] = obj(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/polyglot/load.py", line 61, in load_embeddings p = locate_resource(src_dir, lang) File "/usr/local/lib/python3.9/site-packages/polyglot/load.py", line 43, in locate_resource if downloader.status(package_id) != downloader.INSTALLED: File "/usr/local/lib/python3.9/site-packages/polyglot/downloader.py", line 737, in status info = self._info_or_id(info_or_id) File "/usr/local/lib/python3.9/site-packages/polyglot/downloader.py", line 507, in _info_or_id return self.info(info_or_id) File "/usr/local/lib/python3.9/site-packages/polyglot/downloader.py", line 933, in info raise ValueError('Package %r not found in index' % id) ValueError: Package 'sentiment2.un' not found in index

aina1997 commented 2 years ago

Same problem