Hi!
We are developing a fst based tokeniser for omegat to be able to use our fst tools.
We noticed a bug in the way BaseTokenizer detects the language. It might be elsewhere also.
getLanuages() has 'languages[0].equals(Tokenizer.DISCOVER_AT_RUNTIME)' which never returns true, because string equals() compares object reference.
All best,
Tomi
I believe you have it backwards:
equals()
compares content, while==
compares the reference. IndeedBaseTokenizer.getLanguage()
does use==
; I believe the assumption was that the string would be interned and thus a reference comparison would be better. However when inspecting at runtime, it appears that the value from the annotation is a different object.Last edit: Aaron Madlon-Kay 2017-05-25
This should now be fixed in trunk.
Fixed in the released version 4.1.2 of OmegaT.
Didier