Section navigation

Public classSealed JapaneseTokeniser

Namespace
Rowles.LeanCorpus.Analysis.Tokenisers
Assembly
Rowles.LeanCorpus.dll

Japanese morphological tokeniser using a dictionary-backed least-cost Viterbi search.

public sealed class JapaneseTokeniser : ISpanTokeniser, IDisposable
Inheritance
JapaneseTokeniser
Implements

Remarks

Dictionary data is loaded lazily from a LeanCorpus .jlc file. The default dictionary is shared for the process lifetime. Instances created with a custom dictionary path own that mapping and should be disposed.

Public constructor JapaneseTokeniser()

Initialises a tokeniser using the shared default Japanese dictionary.

Public constructor JapaneseTokeniser(string)

Initialises a tokeniser using a custom Japanese language codec.

Public field JapaneseType

Token type emitted for Japanese dictionary tokens.

Public property DefaultDictionaryPath

Default path for the Japanese language codec.

Public method Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Public method Tokenise(ReadOnlySpan<char>, ISpanTokenSink)

Splits the input text and emits tokens into the supplied sink.