nreimers / truecaser

Language independent truecaser in Python.
Apache License 2.0
161 stars 40 forks source link

Bug in trigrams loop #7

Closed pashalot closed 4 years ago

pashalot commented 4 years ago

There is probably a bug in TrainFunctions.py. In loop that creates trigrams missed assignment to word variable (word = sentence[tokenIdx]). So this loop uses the last value from previous loop.

nreimers commented 4 years ago

Can you point to the lines that you mean?

pashalot commented 4 years ago

https://github.com/nreimers/truecaser/blob/8bc08c4718461dda5fab7b85f72c10b4f7bcf426/TrainFunctions.py#L78

Here word comes from previous loop

nreimers commented 4 years ago

You are right. Thanks for pointing this out. Fixed it.