OPENNLP-1850: Per-language NormalizationProfile registry (2c/7)#1112
Draft
krickert wants to merge 2 commits into
Draft
OPENNLP-1850: Per-language NormalizationProfile registry (2c/7)#1112krickert wants to merge 2 commits into
krickert wants to merge 2 commits into
Conversation
57e2b58 to
82cb041
Compare
b6cd173 to
a345f48
Compare
The language-to-settings registry split out of the former tokenizer PR (#1104) on review request. NormalizationProfiles maps a language code to its stemmer and diacritic fold (the way OpenNLP already selects a Snowball stemmer by language) and builds a search-oriented TermAnalyzer; NormalizationProfile is the per-language record. Builds on the Term model in 2b.
forLanguage("nb")/("nn") returned empty: the registry keyed Norwegian under the macrolanguage
"nor", but the standard written codes nb/nn convert to ISO 639-3 nob/nno, which were absent from the
map -- so Norwegian text got no profile, and the LanguageDetector (which emits nob/nno) hit the same
hole for a language supportedLanguages() advertises. Added nob/nno aliases to the Norwegian stemmer.
82cb041 to
e35e859
Compare
a345f48 to
93618ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2c of the OPENNLP-1850 stack: the language-to-settings registry, split out of the former tokenizer PR (#1104) on review request.
NormalizationProfilesmaps a language code to its stemmer and language-appropriate diacritic fold (the way OpenNLP already selects a Snowball stemmer by language) and builds a search-orientedTermAnalyzer;NormalizationProfileis the per-language record.Base:
OPENNLP-1850-2b-term(#1111). Stack: 1a → 1b → 2a → 2b → 2c (this) → DL → docs.