Page MenuHomePhabricator

Unpack CJK Analyzer
Closed, ResolvedPublic3 Estimated Story Points

Description

As I was reviewing the Japanese data, I realized that it makes sense to go ahead and unpack the CJK analyzer as a back up in general if Kuromoji is not installed, and specifically in our case if Kuromoji doesn't pan out. It is also a backup for Korean if Nori is not installed and could be used for Chinese as well (though it is not surrently configured as a fallback for Chinese).

Details

Related Changes in Gerrit:

Event Timeline

TJones set the point value for this task to 3.Jan 12 2023, 3:45 PM
TJones moved this task from Incoming to In Progress on the Discovery-Search (Current work) board.

Change 879083 had a related patch set uploaded (by Tjones; author: Tjones):

[mediawiki/extensions/CirrusSearch@master] Unpack CJK Analyzer

https://gerrit.wikimedia.org/r/879083

Full write up on Mediawiki.

Unpacked cjk analyzer:

  • Replaced custom stopword list (all English words) with _english_ stopword list, which is almost the same
  • Refactor to allow "text" field to use the standard tokenizer and "plain" to (continue to) use ICU tokenization
  • Added char_filter to map (han)dakuten to combining forms to keep icu_normalizer from (incorrectly) adding spaces when normalizing them

There's a much bigger impact on the Wiktionary sample than the Wikipedia sample. Most impact is on Latin text, and next biggest impact is on other non-CJK scripts—hence the bigger impact on Wiktionary.

Change 879083 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Unpack CJK Analyzer

https://gerrit.wikimedia.org/r/879083