You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for all your hard work on this project, and for making it open source. As a newbie trying to get going with a freshly installed copy of CLTK, I ran into a situation where a corpus I needed was missing, but I had a hard time using the error message to figure out that the error was a missing corpus or what I needed to do to fix that. The error was because I was trying to do lemmatization in Greek but hadn't installed greek_models_cltk. The error message was a python stack trace, the final line of which was the following:
FileNotFoundError: [Errno 2] No such file or directory: '/home/bcrowell/cltk_data/greek/model/greek_models_cltk/lemmata/greek_lemmata_cltk.py'
It would be helpful if the software could catch this exception and give a more informative error message. Such an error message would be something like "You need to install the greek_models_cltk corpus. To do this, first use CorpusImporter('greek') to create a CorpusImporter object, then do import_corpus('greek_models_cltk')." Note that in the error message that is currently output, the word "corpus" never occurs, and the strings "greek" and "greek_models_cltk" are not contiguous in the description of the missing directory.
The text was updated successfully, but these errors were encountered:
Yes, I did figure it out -- thanks for asking! Other than this, I had some relatively minor suggestions about documentation. I'll post that as a separate issue.
Thank you very much for this issue that helped me to solve the same problem! Just to be clearer for other newbies like me, here is an example of code for lemmatizer:
Thanks for all your hard work on this project, and for making it open source. As a newbie trying to get going with a freshly installed copy of CLTK, I ran into a situation where a corpus I needed was missing, but I had a hard time using the error message to figure out that the error was a missing corpus or what I needed to do to fix that. The error was because I was trying to do lemmatization in Greek but hadn't installed greek_models_cltk. The error message was a python stack trace, the final line of which was the following:
FileNotFoundError: [Errno 2] No such file or directory: '/home/bcrowell/cltk_data/greek/model/greek_models_cltk/lemmata/greek_lemmata_cltk.py'
It would be helpful if the software could catch this exception and give a more informative error message. Such an error message would be something like "You need to install the greek_models_cltk corpus. To do this, first use CorpusImporter('greek') to create a CorpusImporter object, then do import_corpus('greek_models_cltk')." Note that in the error message that is currently output, the word "corpus" never occurs, and the strings "greek" and "greek_models_cltk" are not contiguous in the description of the missing directory.
The text was updated successfully, but these errors were encountered: