3

I want to run mallet using the --use-ngrams true option but can't seem to get it working.

bin\mallet import-file --input ovary.txt --output ovary2.mallet --keep-sequence-bigrams --remove-stopwords

bin\mallet train-topics --input ovary2.mallet --output-topic-keys ovary_keys2_2.txt --use-ngrams true --num-topics 15

But I'm getting this error:

Unrecognized option 4: --use-ngrams

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
Ali N
  • 31
  • 2
  • Which version of mallet are you using? The latest version does not support n-grams attribute. The n-grams attribute has been removed from the latest version. The present mallet version uses inbuilt n-grams feature before giving the output. So, either use the latest version or let me know the version which you are using. – eshb Nov 24 '16 at 06:59

1 Answers1

1

In mallet version 2.0.8 you would use:

bin\mallet import-file --input ovary.txt --output ovary2.mallet --keep-sequence-bigrams --remove-stopwords   --gram-sizes 1,2

bin\mallet train-topics --input ovary2.mallet --output-topic-keys ovary_keys2_2.txt  --num-topics 15

You an see the available options at:

bin\mallet import-file  --help

bin\mallet train-topics --help
washingon
  • 981
  • 2
  • 10
  • 20