diff options
author | Sasha Sorokin <dafri.nochiterov8@gmail.com> | 2020-06-26 03:45:01 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 22:45:01 +0200 |
commit | f5cea4d2ea314a78d44ef013c6dabda32ad96df1 (patch) | |
tree | 061b13f1f2d96ca6365e03ffdf8991c464b8d8f4 | |
parent | f7bdfec5bba683f25dd9cf497f84d202ca5267c2 (diff) |
Fix Thai being skipped from language detection (#13989)
Thai does not separate words by spaces, so I figured out it should be in 'reliable characters regexp' that denotes languages that do the same. Related #13891.
-rw-r--r-- | app/lib/language_detector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/language_detector.rb b/app/lib/language_detector.rb index 05a06726d..2cc8ac615 100644 --- a/app/lib/language_detector.rb +++ b/app/lib/language_detector.rb @@ -4,7 +4,7 @@ class LanguageDetector include Singleton WORDS_THRESHOLD = 4 - RELIABLE_CHARACTERS_RE = /[\p{Hebrew}\p{Arabic}\p{Syriac}\p{Thaana}\p{Nko}\p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}]+/m + RELIABLE_CHARACTERS_RE = /[\p{Hebrew}\p{Arabic}\p{Syriac}\p{Thaana}\p{Nko}\p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}\p{Thai}]+/m def initialize @identifier = CLD3::NNetLanguageIdentifier.new(1, 2048) |