I am working with a Java Library used for identifying the language of a given text. It relies on an n-gram analysis of the text to return a set of languages it might be and the "confidence" that it is that language.
I wrote a wrapper class to run it, however, it is non-deterministic (results are generally incorrect with <200 chars input, don't worry about that):
C:\wamp\www\langdetect [master]> java Detect viking rowboat af:0.8571411945873898 lt:0.1428569473433962 C:\wamp\www\langdetect [master]> java Detect viking rowboat af:0.5714268373011915 sw:0.2857137271014559 lt:0.14285898741269984 C:\wamp\www\langdetect [master]> java Detect viking rowboat af:0.9999958253321346
The analysis is non-deterministic by default (can be made deterministic like so: https://code.google.com/p/language-detection/issues/detail?id=64) but my question is this:
Is there any advantage to this analysis being non-deterministic?
The only upside I can think of is that a deterministic algorithm will, statistically, be incorrect a percentage of the time (even with valid input), while non-deterministic removes this guarantee (but still is incorrect sometimes). Does this even make sense?