greyblake / whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
https://whatlang.org/
MIT License
966 stars 108 forks source link

differentiate between mandarin and japanese with whitelist or blackli… #45

Closed purtato closed 4 years ago

purtato commented 5 years ago

Fixes issue #44

This assumes that if the text contains any "hiragana" or "katakana" characters, it will go to Script::Japanese

Because the text will consist solely of Mandarin characters, this only adds checks for whitelist and blacklist logic. If no whitelist or blacklist is supplied, this what would previously have been returned: Some((Lang::Cmn, 1.0))

greyblake commented 5 years ago

Tnx! I'll take a look over the weekends.

greyblake commented 4 years ago

I apologize for the huuuuge delay. Thanks for the fix. It's released in version 0.7.2.