budoux

Types

A parser that splits sentences into phrases.

Creating one takes some time, so create it once and reuse it.

pub opaque type Parser

Values

pub fn ja() -> Parser

Creates a parser with the Japanese model.

pub fn ja_word() -> Parser

Creates a parser with the Japanese word model. It splits sentences into words rather than phrases.

pub fn new(model: model.Model) -> Parser

Creates a parser from a model.

pub fn parse(parser: Parser, sentence: String) -> List(String)

Splits a sentence into phrases.

let parser = budoux.ja()
budoux.parse(parser, "今日は天気です。")
// -> ["今日は", "天気です。"]
pub fn th() -> Parser

Creates a parser with the Thai model.

pub fn zh_hans() -> Parser

Creates a parser with the Simplified Chinese model.

pub fn zh_hant() -> Parser

Creates a parser with the Traditional Chinese model.

✨ Search Document