Please sign in to comment.
Set WordPairScore to prefer maximum scoring pairs (rather than random).
Before, WordPairScore will take the last value of the potential translation, in the event of clashes. This didn't seem correct. For example (using the dictionary.csv from the tutorial): He abstained from any further comments. Se abstuvo de hacer mas comentarios. The words 'abstained' and 'any' both can map to 'se', but 'abstained' score is 0.0138 while 'any' is 0.0015. The current code will return the smallest value because 'any' appears later in the sentence. This commit fixes this issue, by updating the values to keep the maximum score registered within the sentence.
- Loading branch information...