
KoreanStemmer
- Namespace
- Rowles.LeanCorpus.Analysis.Stemmers
- Assembly
- Rowles.LeanCorpus.dll
Korean stemmer β identity implementation.
public sealed class KoreanStemmer : ISpanStemmer
- Inheritance
-
KoreanStemmer
- Implements
Remarks
Korean is a highly agglutinative language where grammatical information (tense, case, honorific level, negation, aspect) is encoded in chains of bound morphemes attached to a content root β for example, λ¨Ήλ€ (eat) β λ¨Ήμμ΅λλ€, λ¨Ήκ³ μΆμ΄μ, λ¨Ήνλ€. The boundaries between morphemes can require phonological rules (e.g. consonant assimilation) that cannot be resolved by simple string suffix removal.
Recommended pre-processing for Korean search:
- POS-tagging and morpheme segmentation with Mecab-ko, Komoran, or Nori
- Lemmatisation to dictionary base form (μν)
- Jamo decomposition for sub-syllable indexing when required
This class is provided so the ISpanStemmer pipeline compiles uniformly
across all supported languages.
Stem(ReadOnlySpan<char>, Span<char>)
Stems word into output.
Returns the length of the stemmed result, or -1 if output is too small.
The caller must ensure output.Length >= word.Length for guaranteed success.
Stem(string)
Convenience overload returning the stemmed string.