Section navigation

Public classSealed 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.

Public method 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.

Public method Stem(string)

Convenience overload returning the stemmed string.