// generated by diplomat-tool
import type { DataError } from "./DataError"
import type { DataProvider } from "./DataProvider"
import type { Locale } from "./Locale"
import type { SentenceBreakIteratorUtf16 } from "./SentenceBreakIteratorUtf16"
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";



/**
 * An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
 *
 * See the [Rust documentation for `SentenceSegmenter`](https://docs.rs/icu/2.2.0/icu/segmenter/struct.SentenceSegmenter.html) for more information.
 */
export class SentenceSegmenter {
    /** @internal */
    get ffiValue(): pointer;


    /**
     * Construct a {@link SentenceSegmenter} for content known to be of a given locale, using compiled data.
     */
    static createWithContentLocale(locale: Locale): SentenceSegmenter;

    /**
     * Construct a {@link SentenceSegmenter}  for content known to be of a given locale, using a particular data source.
     */
    static createWithContentLocaleAndProvider(provider: DataProvider, locale: Locale): SentenceSegmenter;

    /**
     * Segments a string.
     *
     * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
     * to the WHATWG Encoding Standard.
     *
     * See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/2.2.0/icu/segmenter/struct.SentenceSegmenterBorrowed.html#method.segment_utf16) for more information.
     */
    segment(input: string): SentenceBreakIteratorUtf16;

    /**
     * Construct a {@link SentenceSegmenter} using compiled data. This does not assume any content locale.
     *
     * See the [Rust documentation for `new`](https://docs.rs/icu/2.2.0/icu/segmenter/struct.SentenceSegmenter.html#method.new) for more information.
     */
    constructor();
}