rhoknp.processors.senter module

class rhoknp.processors.senter.RegexSenter[source]

Bases: Processor

正規表現にもとづく文分割クラス.

Example

>>> from rhoknp import RegexSenter
>>> senter = RegexSenter()
>>> document = senter.apply("天気が良かったので散歩した。途中で先生に会った。")
apply_to_document(document: Document | str, timeout: int = 10) Document[source]

文書に RegexSenter を適用する.

Parameters:
  • document – 文書.

  • timeout – 最大処理時間..

apply_to_sentence(sentence: Sentence | str, timeout: int = 10) Sentence[source]

文に RegexSenter を適用する.

Parameters:
  • sentence – 文.

  • timeout – 最大処理時間.