biolab / orange3-text

🍊 :page_facing_up: Text Mining add-on for Orange3
Other
127 stars 82 forks source link

Could not create 'Preprecess text' #434

Closed ParkWANG closed 4 years ago

ParkWANG commented 5 years ago
Text version

0.5.2

Orange version

3.21.0

Expected behavior

Crate a "Preprocess Text"

Actual behavior

The program encountered an unexpected error.

Steps to reproduce the behavior
Additional info (worksheets, data, screenshots, ...)

Exception: LookupError: ** Resource J: not found. Please use the NLTK Downloader to obtain the resource: >>> import nltk >>> nltk.download('J:')  Searched in: - '' ** Module: nltk.data:673 Widget Name: Preprocess Text Widget Module: orangecontrib.text.widgets.owpreprocess:629 Widget Scheme: C:\Users\csfwang\AppData\Local\Temp\ows-ii0yb5i7.ows.xml Version: 3.21.0 Environment: Python 3.6.8 on Windows 10 10.0.17134 AMD64 Installed Packages: AnyQt==0.0.10, Bottleneck==1.2.1, LTTL==2.0.6, Orange3-Text==0.5.2, Orange3-Textable==3.1.1, Orange3==3.21.0, PyJWT==1.7.1, PySocks==1.7.0, XlsxWriter==1.1.8, appdirs==1.4.3, asn1crypto==0.24.0, atomicwrites==1.3.0, attrs==19.1.0, backports.functools-lru-cache==1.5, beautifulsoup4==4.7.1, biopython==1.73, blinker==1.4, boto3==1.9.160, boto==2.49.0, botocore==1.12.160, bz2file==0.98, certifi==2019.3.9, cffi==1.12.3, chardet==3.0.4, colorama==0.4.1, cryptography==2.3.1, cycler==0.10.0, decorator==4.4.0, defusedxml==0.5.0, docutils==0.14, docx2txt==0.7, entrypoints==0.3, future==0.17.1, gensim==3.7.3, idna==2.8, importlib-metadata==0.17, jmespath==0.9.4, joblib==0.13.2, keyring==18.0.0, keyrings.alt==3.1.1, kiwisolver==1.1.0, llvmlite==0.28.0, lxml==4.3.3, matplotlib==2.2.2, mkl-fft==1.0.6, mkl-random==1.0.1, more-itertools==4.3.0, networkx==2.3, nltk==3.2.5, numba==0.43.1, numpy==1.14.6, oauthlib==3.0.1, odfpy==1.4.0, openTSNE==0.3.2, packaging==19.0, pdfminer3k==1.3.1, pip==19.1.1, pluggy==0.12.0, ply==3.11, py==1.8.0, pyOpenSSL==19.0.0, pycountry==18.12.8, pycparser==2.19, pyparsing==2.4.0, pyqtgraph==0.10.0, pytest==4.6.2, python-crfsuite==0.9.6, python-dateutil==2.8.0, python-louvain==0.13, pytz==2019.1, pywin32==223, requests-oauthlib==1.2.0, requests==2.21.0, s3transfer==0.2.0, scikit-learn==0.20.1, scipy==1.1.0, serverfiles==0.3.0, setuptools-git==1.2, setuptools==41.0.1, simhash==1.9.0, six==1.12.0, smart-open==1.8.4, soupsieve==1.9.1, tornado==6.0.2, treetaggerwrapper==2.3, tweepy==3.6.0, twython==3.7.0, typing==3.6.4, ufal.udpipe-temp==1.2.0.4, ufal.udpipe==1.2.0.2, urllib3==1.24.2, validate-email==1.3, wcwidth==0.1.7, wheel==0.33.4, wikipedia==1.4.0, win-inet-pton==1.1.0, wincertstore==0.2, xlrd==1.2.0, zipp==0.5.1 Machine ID: 345052807176 Stack Trace: Traceback (most recent call last): File "C:\Program Files\Orange\lib\site-packages\Orange\canvas\scheme\widgetsscheme.py", line 579, in create_widget_instance widget.init() File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\widgets\owpreprocess.py", line 629, in init widget = stage(self) File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\widgets\owpreprocess.py", line 113, in init self.setup_method_layout() File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\widgets\owpreprocess.py", line 517, in setup_method_layout self.methods = [method() for method in self.methods[:self.STANFORD]] File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\widgets\owpreprocess.py", line 517, in self.methods = [method() for method in self.methods[:self.STANFORD]] File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\misc\nltk_data_download.py", line 55, in wrapper return func(*args, **kwargs) File "C:\Program Files\Orange\lib\site-packages\orangecontrib\text\tag\pos.py", line 72, in init super().init(nltk.PerceptronTagger(), self.name) File "C:\Program Files\Orange\lib\site-packages\nltk\tag\perceptron.py", line 141, in init self.load(AP_MODEL_LOC) File "C:\Program Files\Orange\lib\site-packages\nltk\tag\perceptron.py", line 223, in load self.model.weights, self.tagdict, self.classes = load(loc) File "C:\Program Files\Orange\lib\site-packages\nltk\data.py", line 834, in load opened_resource = _open(resource_url) File "C:\Program Files\Orange\lib\site-packages\nltk\data.py", line 955, in open return find(path, ['']).open() File "C:\Program Files\Orange\lib\site-packages\nltk\data.py", line 673, in find raise LookupError(resource_not_found) LookupError:


Resource J: not found. Please use the NLTK Downloader to obtain the resource:

>>> import nltk

nltk.download('J:')  Searched in:

  • ''

Local Variables: OrderedDict([('i', 10), ('m', <_sre.SRE_Match object; span=(0, 0), match=''>), ('modified_name', '/J:/COMPDrive/staff2/csfwang/COMProfile/AppData/nltk_data/taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle.zip/averaged_perceptron_tagger.pickle'), ('msg', ' Resource \x1b[93mJ:\x1b[0m not found.\n' ' Please use the NLTK Downloader to obtain the resource:\n' '\n' ' \x1b[31m>>> import nltk\n' " >>> nltk.download('J:')\n" ' \x1b[0m\n' ' Searched in:\n' " - ''"), ('p', 'J:\COMPDrive\staff2\csfwang\COMProfile\AppData\nltk_data\taggers\averaged_perceptron_tagger\averaged_perceptrontagger.pickle'), ('path', ''), ('paths', ['']), ('pieces', ['', 'J:', 'COMPDrive', 'staff2', 'csfwang', 'COMProfile', 'AppData', 'nltk_data', 'taggers', 'averaged_perceptron_tagger', 'averaged_perceptron_tagger.pickle']), ('resource_name', '/J:/COMPDrive/staff2/csfwang/COMProfile/AppData/nltk_data/taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle'), ('resource_not_found', '\n' '**\n' ' Resource \x1b[93mJ:\x1b[0m not found.\n' ' Please use the NLTK Downloader to obtain the resource:\n' '\n' ' \x1b[31m>>> import nltk\n' " >>> nltk.download('J:')\n" ' \x1b[0m\n' ' Searched in:\n' " - ''\n" '**\n'), ('resource_zipname', 'J:'), ('sep', '**'), ('zipentry', None), ('zipfile', None)])

ParkWANG commented 5 years ago

I'm so confusing what's this problem. BTW, i have installed all the NLTK Package.

ajdapretnar commented 4 years ago

Could you please update and see if the problem persists? I was not able to reproduce this with the current version or any of the earlier ones. :(

ajdapretnar commented 4 years ago

Closed due to inactivity.