Interface SegmentData

interface SegmentData {
    index: number;
    input: string;
    isWordLike?: boolean;
    segment: string;
}

Properties

index: number

The code unit index in the original input string at which the segment begins.

input: string

The complete input string that was segmented.

isWordLike?: boolean

A boolean value only if granularity is "word"; otherwise, undefined. If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.

segment: string

A string containing the segment extracted from the original input string.