// generated by diplomat-tool import type { DataError } from "./DataError" import type { DataProvider } from "./DataProvider" import type { Locale } from "./Locale" import type { WordBreakIteratorUtf16 } from "./WordBreakIteratorUtf16" import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
/** *AnICU4Xword-breaksegmenter,capableoffindingwordbreakpointsinstrings. * *Seethe[Rustdocumentationfor`WordSegmenter`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html) for more information.
*/
export class WordSegmenter { /** @internal */
get ffiValue(): pointer; /** @internal */
constructor();
/** *Constructan{@linkWordSegmenter}withautomaticallyselectingthebestavailableLSTM *ordictionarypayloaddata,usingcompileddata.Thisdoesnotassumeanycontentlocale. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`new_auto`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.new_auto) for more information.
*/ static createAuto(): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withautomaticallyselectingthebestavailableLSTM *ordictionarypayloaddata,usingcompileddata. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_auto`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_auto) for more information.
*/ static createAutoWithContentLocale(locale: Locale): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withautomaticallyselectingthebestavailableLSTM *ordictionarypayloaddata,usingaparticulardatasource. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_auto`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_auto) for more information.
*/ static createAutoWithContentLocaleAndProvider(provider: DataProvider, locale: Locale): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withLSTMpayloaddataforBurmese,Khmer,Lao,and *Thai,usingcompileddata.Thisdoesnotassumeanycontentlocale. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`new_lstm`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.new_lstm) for more information.
*/ static createLstm(): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withLSTMpayloaddataforBurmese,Khmer,Lao,and *Thai,usingcompileddata. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_lstm`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_lstm) for more information.
*/ static createLstmWithContentLocale(locale: Locale): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withLSTMpayloaddataforBurmese,Khmer,Lao,and *Thai,usingaparticulardatasource. * *Note:currently,itusesdictionaryforChineseandJapanese,andLSTMforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_lstm`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_lstm) for more information.
*/ static createLstmWithContentLocaleAndProvider(provider: DataProvider, locale: Locale): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withwithdictionarypayloaddataforChinese,Japanese, *Burmese,Khmer,Lao,andThai,usingcompileddata.Thisdoesnotassumeanycontentlocale. * *Note:currently,itusesdictionaryforChineseandJapanese,anddictionaryforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`new_dictionary`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary) for more information.
*/ static createDictionary(): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withdictionarypayloaddataforChinese,Japanese, *Burmese,Khmer,Lao,andThai,usingcompileddata. * *Note:currently,itusesdictionaryforChineseandJapanese,anddictionaryforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_dictionary`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_dictionary) for more information.
*/ static createDictionaryWithContentLocale(locale: Locale): WordSegmenter;
/** *Constructan{@linkWordSegmenter}withdictionarypayloaddataforChinese,Japanese, *Burmese,Khmer,Lao,andThai,usingaparticulardatasource. * *Note:currently,itusesdictionaryforChineseandJapanese,anddictionaryforBurmese, *Khmer,Lao,andThai. * *Seethe[Rustdocumentationfor`try_new_dictionary`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenter.html#method.try_new_dictionary) for more information.
*/ static createDictionaryWithContentLocaleAndProvider(provider: DataProvider, locale: Locale): WordSegmenter;
/** *Segmentsastring. * *Ill-formedinputistreatedasiferrorshadbeenreplacedwithREPLACEMENTCHARACTERsaccording *totheWHATWGEncodingStandard. * *Seethe[Rustdocumentationfor`segment_utf16`](https://docs.rs/icu/2.1.1/icu/segmenter/struct.WordSegmenterBorrowed.html#method.segment_utf16) for more information.
*/
segment(input: string): WordBreakIteratorUtf16;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.