piskvorky/gensim — pull request #222 by mcburton (2014-07-23 11:40:56+00:00)
Title: adding the --preserve-case flag to the import-file command

By default MALLET converts all word features to lowercase, this is not always the desired functionality. This causes a key error when looking up top-words in the corpus dictionary that are capitalized in the corpus object but lowercase in the model object. By adding the --preserve-case flag MALLET won't convert words to lowercase (if they exist). Converting to lowercase should happen *before* writing the MALLET files when generating the corpus/dictionary objects.