senarvi / theanolm

TheanoLM is a recurrent neural network language modeling tool implemented using Theano
Apache License 2.0
81 stars 29 forks source link

Issues in recent updates #25

Closed nzal closed 7 years ago

nzal commented 7 years ago

It seems that a recent update messed up something in the pipeline. I installed the package a week ago using pip and it worked fine, installed it again on another machine yesterday and got this error when I was trying to use it. I noticed that there were some recent commits that may have caused it.

Traceback (most recent call last): File "/usr/local/bin/theanolm", line 8, in from theanolm.commands import * ImportError: No module named 'theanolm.commands'

senarvi commented 7 years ago

Indeed I made small changes to that file, but not in the line in question. Could you check that your PYTHONPATH is set and that the theanolm/commands directory is installed somewhere along that path. I'll check if installing from pip still works.

senarvi commented 7 years ago

I just tried installing with pip3 install --home TheanoLM. The modules were installed to ~/.local/lib/python3.5/site-packages/theanolm. Running the script ~/.local/bin/theanolm worked even though I don't have that directory on my PYTHONPATH. By executing import sys; print(sys.path) in Python interpreter, I can see that the package directory is included in the installation-dependent default paths. Since you have a working installation, you could compare in which directory the modules get installed and what you have in sys.path in those two computers.

nzal commented 7 years ago

Thanks for the followup, it works fine, it was just a path issue.

I also have another question please, and thought might not be worthy to open anther Issue thread for. What is the expected format for the lattice decoding input? and how to generate the lattice structure? I am NOT working in ASR, I am modeling the various lemma options for lemma space, so I have the lemma options for each word in a file, and need to decode accordingly (generating nbest lists is vastly unfeasible), so I will need to generate the lattice structure myself.

senarvi commented 7 years ago

The lattice has to be in SLF format. You can find an exact definition and an example here.