Skip to content

Instantly share code, notes, and snippets.

@erochest
Last active August 29, 2015 14:25
Show Gist options
  • Save erochest/13cd944d88b7a6434cc0 to your computer and use it in GitHub Desktop.
Save erochest/13cd944d88b7a6434cc0 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
KEY=barth
INPUT=paragraphs/
mallet import-dir --input $INPUT --output $KEY.mallet --keep-sequence --remove-stopwords
mallet train-topics --input $KEY.mallet --num-topics 20 \
--output-model $KEY.model --output-state $KEY.state.gz --output-doc-topics $KEY.doc.topics \
--output-topic-keys $KEY.keys \
--topic-word-weights-file $KEY.weights --word-topic-counts-file $KEY.words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment