Open GoogleCodeExporter opened 9 years ago
I intend that setPriorMap not only gives weight to each language but also
restricts ones.
So, as you mentioned, it requires setting all languages you want to detect.
Is it satified your demand slightly if a default prior map can be retrieved?
Original comment by nakatani.shuyo
on 18 Apr 2011 at 3:23
[deleted comment]
[deleted comment]
> priorMap.put("en", new Double(0.0));
The language whose prior set to 0 has always probability 0.
If you want to place the weight on English, set larger probability.
> priorMap.put("ja", new Double(0.01));
> priorMap.put("en", new Double(0.1));
Though the above prior is not normalized(i.e. its sum is not 1.0), the
setPriorMap method normalizes the prior automatically.
Original comment by nakatani.shuyo
on 19 Apr 2011 at 5:31
[deleted comment]
This library cannot detect the language of proper nouns like person names,
place names and so on. (For example, what language is "iPhone"?)
It is because your example is detected as zh-tw that the library uses only the
frequency rate of each kanji in this case.
Original comment by nakatani.shuyo
on 20 Apr 2011 at 6:43
with comments being deleted, I think it might be a good idea (when anyone has
the time) to add a full example to wiki on how to use .setPriorMap method -
this would have a wider benefit to everyone else. Thanks
Original comment by mawa...@live.com
on 20 Apr 2011 at 7:04
I see.
I'll do it. Thanks.
Original comment by nakatani.shuyo
on 21 Apr 2011 at 3:12
Original issue reported on code.google.com by
ed_b...@yahoo.com
on 16 Apr 2011 at 6:32