Closed lababidi closed 10 years ago
Thanks, I appreciate the code, but I think there's probably a cleaner way to do it using functions from os.path. I'll take a look later, unless you can make updates before I get to it.
Ok. Thanks for the suggestion. It helped me learn a bit more. Thanks. Edit has been committed.
On Sun, Jul 13, 2014 at 11:32 AM, Jacob Perkins notifications@github.com wrote:
Thanks, I appreciate the code, but I think there's probably a cleaner way to do it using functions from os.path. I'll take a look later, unless you can make updates before I get to it.
— Reply to this email directly or view it on GitHub https://github.com/japerk/nltk-trainer/pull/26#issuecomment-48843653.
Thanks!
Case: ./train_classifier ../some_dir/corpus This will place the classifier as /home/user/nltk_date/classifiers/../some_dir/corpus_NaiveBayes.pickle which is equal to /home/user/nltk_date/some_dir/corpus_NaiveBayes.pickle
I assume the purpose of NLTK Trainer is to keep all classifiers in nltk_data/classifiers so I fixed the code by regex stripping all leading folders from the corpus name.