makcedward / nlp

:memo: This repository recorded my NLP journey.
https://makcedward.github.io/
1.07k stars 326 forks source link

No module named aion. Issue while importing aion #1

Closed amithadiraju1694 closed 5 years ago

amithadiraju1694 commented 5 years ago

Hello Edward,

Thank you for the great article and detailed blog post about ELMO. I used one of the resources you posted for ELMO in keras before, I thought that implementation lacked some things, like ability to normalize vectors, your implementation is certainly better than the one in resources.

When I tried to import aion, I'm facing an error which says "ModuleNotFoundError: No module named 'aion'". I know that this is a fairly common packaging issue, but I wasn't able to resolve it, I didn't find any reliable online source either to be able to fix it. Please let me know if you have faced such an issue at all, any pointers will be appreciated.

I was able to successfully download aion by "pip install aion"

I'm using:

Python 3.6.7

Windows 10

Thanks

makcedward commented 5 years ago

Hi,

You may simply run the following command to load aion library for testing. The library is still under implementation. Does not ready for pip install yet.

`import sys, os aion_dir = 'the/path/of/aion/' sys.path.insert(0, aion_dir)

add_aion()`

Thanks.

saravananpsg commented 5 years ago

@makcedward nice repo. I will bookmark it for my future reference

While I was trying to run your code, nlp-embeddings-document-doc2vec notebook, the /aion/embedding/doc2vec.py was looking for a dependency file inside aion/util/word/WordConverter.

Even after it commenting this, I got this message :

NameError Traceback (most recent call last)

in () 1 from aion.embeddings.doc2vec import DocumentEmbeddings ----> 2 doc2vec_embs = Doc2VecEmbeddings() 3 x_train_tokens = doc2vec_embs.build_vocab(documents=x_train) 4 doc2vec_embs.train(x_train_tokens) NameError: name 'Doc2VecEmbeddings' is not defined Would be great, if you can offer your advice on this? ~ Sara
saravananpsg commented 5 years ago

@makcedward no worries. I solved the "NameError issues". Probably, due to the folder path issues.However, still i can't find the file - /aion/util/word/WordConverter.

makcedward commented 5 years ago

@saravananpsg WordConverter class is deprecated. I removed it from repo. Please pull again to get the latest status.

Thanks.

makcedward commented 5 years ago

Closed.

nalcvp commented 4 years ago

I have the same ModuleNotFoundError and this suggestion:

`import sys, os aion_dir = 'the/path/of/aion/' sys.path.insert(0, aion_dir)

add_aion()`

did not work. Is there an alternate solution?

Srijha09 commented 4 years ago

Had the same issue. `import sys, os aion_dir = 'the/path/of/aion/' sys.path.insert(0, aion_dir)

add_aion()` Did not work

etam89 commented 4 years ago

I have the same problem.... are there a solution?

anthonysfancher commented 3 years ago

need a solution!! dont know how to use the import sys,os, where is the library?