Skip to content

Commit

Permalink
Ignore ampersant
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Mar 5, 2013
1 parent fb40ad1 commit ed810ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markov/hnparse3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def load_file(filename):
with open(filename, 'rb') as fd:
for line in fd:
# last element is always empty due to \n
yield [intern(w) for w in split_re.split(line.lower())][:-1]
yield [intern(w) for w in split_re.split(line.lower().replace('&', '&'))][:-1]


print "[.] Loading trigrams"
Expand Down

0 comments on commit ed810ad

Please sign in to comment.