fix logic of apostrophe-fixing

Former-commit-id: c4c1af8213
This commit is contained in:
Robyn Speer 2015-09-08 13:47:58 -04:00
parent 523806d6db
commit d6d2eac920

View File

@ -222,4 +222,4 @@ def correct_apostrophe_trimming(freqs):
freq = freqs[trim_word] freq = freqs[trim_word]
freqs[trim_word] = freq * (1 - trim_prob) freqs[trim_word] = freq * (1 - trim_prob)
freqs[trim_word + "'t"] = freq * trim_prob freqs[trim_word + "'t"] = freq * trim_prob
return freqs return freqs