attardi / deepnl

Deep Learning for Natural Language Processing
GNU General Public License v3.0
457 stars 116 forks source link

unable to import tagger #24

Closed sharadlnx closed 8 years ago

sharadlnx commented 8 years ago

from deepnl.tagger import Tagger gives the following error ImportError: No module named tagger

attardi commented 8 years ago

You should install the package with: python setup.py install

sharadlnx commented 8 years ago

hello Sir I have installed the package as per you said earlier Here is the details:

sharad@sharad-Precision-WorkStation-T3500:~/Desktop/deepnl$ python setup.py install running install running bdist_egg running egg_info writing deepnl.egg-info/PKG-INFO writing top-level names to deepnl.egg-info/top_level.txt writing dependency_links to deepnl.egg-info/dependency_links.txt reading manifest file 'deepnl.egg-info/SOURCES.txt' writing manifest file 'deepnl.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/init.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/sentiwords.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/networkseq.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/corpus.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/math.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/ner_tagger.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/hpca.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/embeddings.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/networkconv.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/words.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/extractors.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/network.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/tagger.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/trainerconv.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/trainer.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/utils.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/word_dictionary.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/classifier.so -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/reader.py -> build/bdist.linux-x86_64/egg/deepnl copying build/lib.linux-x86_64-2.7/deepnl/pos_tagger.py -> build/bdist.linux-x86_64/egg/deepnl byte-compiling build/bdist.linux-x86_64/egg/deepnl/init.py to init.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/corpus.py to corpus.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/ner_tagger.py to ner_tagger.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/embeddings.py to embeddings.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/utils.py to utils.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/word_dictionary.py to word_dictionary.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/reader.py to reader.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/pos_tagger.py to pos_tagger.pyc creating stub loader for deepnl/words.so creating stub loader for deepnl/hpca.so creating stub loader for deepnl/classifier.so creating stub loader for deepnl/extractors.so creating stub loader for deepnl/hpca.so creating stub loader for deepnl/math.so creating stub loader for deepnl/network.so creating stub loader for deepnl/networkconv.so creating stub loader for deepnl/networkseq.so creating stub loader for deepnl/sentiwords.so creating stub loader for deepnl/tagger.so creating stub loader for deepnl/trainer.so creating stub loader for deepnl/trainerconv.so creating stub loader for deepnl/words.so byte-compiling build/bdist.linux-x86_64/egg/deepnl/words.py to words.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/hpca.py to hpca.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/classifier.py to classifier.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/extractors.py to extractors.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/math.py to math.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/network.py to network.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/networkconv.py to networkconv.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/networkseq.py to networkseq.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/sentiwords.py to sentiwords.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/tagger.py to tagger.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/trainer.py to trainer.pyc byte-compiling build/bdist.linux-x86_64/egg/deepnl/trainerconv.py to trainerconv.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts running install_scripts running build_scripts creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-pos.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/mwe.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/toIOB.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-ner.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/knn.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/ssyevr.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/senna-tag.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-sentiwords.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/tweet-tokenize.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-words.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-conv.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.7/dl-words-pca.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-pos.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/mwe.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/toIOB.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-ner.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/knn.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/ssyevr.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/senna-tag.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-sentiwords.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/tweet-tokenize.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-words.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-conv.py to 775 changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/dl-words-pca.py to 775 copying deepnl.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying deepnl.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying deepnl.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying deepnl.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... creating 'dist/deepnl-1.3.15-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing deepnl-1.3.15-py2.7-linux-x86_64.egg Removing /usr/local/lib/python2.7/dist-packages/deepnl-1.3.15-py2.7-linux-x86_64.egg Copying deepnl-1.3.15-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages deepnl 1.3.15 is already the active version in easy-install.pth Installing tweet-tokenize.py script to /usr/local/bin Installing mwe.py script to /usr/local/bin Installing dl-conv.py script to /usr/local/bin Installing dl-pos.py script to /usr/local/bin Installing ssyevr.py script to /usr/local/bin Installing dl-words-pca.py script to /usr/local/bin Installing senna-tag.py script to /usr/local/bin Installing dl-sentiwords.py script to /usr/local/bin Installing dl-words.py script to /usr/local/bin Installing dl-ner.py script to /usr/local/bin Installing knn.py script to /usr/local/bin Installing toIOB.py script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/deepnl-1.3.15-py2.7-linux-x86_64.egg Processing dependencies for deepnl==1.3.15 Finished processing dependencies for deepnl==1.3.15

But the problem is not resolved.It gives the following error

sharad@sharad-Precision-WorkStation-T3500:~/Desktop/deepnl$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from deepnl.tagger import Tagger Traceback (most recent call last): File "", line 1, in ImportError: No module named tagger

On Sat, Feb 27, 2016 at 5:08 PM, Giuseppe Attardi notifications@github.com wrote:

You should install the package with: python setup.py install

— Reply to this email directly or view it on GitHub https://github.com/attardi/deepnl/issues/24#issuecomment-189621083.

attardi commented 8 years ago

That's weird. Does this work?

import deepnl

Do any of the scripts in deepnl/bin work? E.g.:

bin/dl-ner.py -h
surajch77 commented 8 years ago
import deepnl 

works fine but while importing deepnl.tagger it shows error. How to handle that

vipulraheja commented 7 years ago

@attardi The scripts in deepnl/bin work, and the import deepnl command works too. But from deepnl.tagger import Tagger does not work.

shoumikchow commented 7 years ago

@attardi The problem is not solved. The scripts in deepnl/bin work and

import deepnl

works but none of the taggers work when I want to use them in Python.