Debian Codegraph @

intl/icu_capi/bindings/js/ICU4XSentenceSegmenter.d.ts

raw
1 import { FFIError } from "./diplomat-runtime"
2 import { ICU4XDataProvider } from "./ICU4XDataProvider";
3 import { ICU4XError } from "./ICU4XError";
4 import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1";
5 import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16";
6 import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8";
7
8 /**
9
10 * An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
11
12 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html Rust documentation for `SentenceSegmenter`} for more information.
13 */
14 export class ICU4XSentenceSegmenter {
15
16 /**
17
18 * Construct an {@link ICU4XSentenceSegmenter `ICU4XSentenceSegmenter`}.
19
20 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new Rust documentation for `new`} for more information.
21 * @throws {@link FFIError}<{@link ICU4XError}>
22 */
23 static create(provider: ICU4XDataProvider): ICU4XSentenceSegmenter | never;
24
25 /**
26
27 * Segments a string.
28
29 * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
30
31 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
32 */
33 segment_utf8(input: string): ICU4XSentenceBreakIteratorUtf8;
34
35 /**
36
37 * Segments a string.
38
39 * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
40
41 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
42 */
43 segment_utf16(input: string): ICU4XSentenceBreakIteratorUtf16;
44
45 /**
46
47 * Segments a Latin-1 string.
48
49 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
50 */
51 segment_latin1(input: Uint8Array): ICU4XSentenceBreakIteratorLatin1;
52 }