Skip to content

Commit

Permalink
fix #43
Browse files Browse the repository at this point in the history
  • Loading branch information
zachguo committed May 14, 2014
1 parent cf80b5a commit 340100f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text_processing/map_reduce/getTF/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def print_ngram(sent):
if doc_id:
# get ngrams
for i in xrange(numw):
for j in xrange(i+1, min(i+4, numw)):
for j in xrange(i+1, min(i+4, numw+1)):
term = ' '.join(words[i:j])
# emit key-value pair into stdout, key is a composite key made up of a doc_id, a separator and a term.
print '%s[SEP]%s\t%s' % (doc_id,term,1)
Expand Down

0 comments on commit 340100f

Please sign in to comment.