Skip to content

Commit

Permalink
better arg parsing for stemming / no stemming
Browse files Browse the repository at this point in the history
  • Loading branch information
zbsimon committed May 26, 2015
1 parent 5aef789 commit 5cf7b04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapred_tfidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def get_output_dir(sub_dir=''):
help=stop_words_help, dest='stop_words')

stemmer_help = 'if true, use nltk PorterStemmer to stem ngrams'
parser.add_argument('-t', '--stem', type=bool, dest='stem', default=True)
parser.add_argument('--stem', type=bool, action='store_true', dest='stem')
parser.add_argument('--no-stem', type=bool, action='store_false', dest='stem')
parser.set_defaults(stem=True)

args = parser.parse_args()
input_dir = args.input_dir
Expand Down

0 comments on commit 5cf7b04

Please sign in to comment.