punkt
Version:
A port of NLTK's Punkt sentence tokenizer to JS.
30 lines • 885 B
TypeScript
export default class PunktToken {
readonly tok: string;
readonly type: string;
readonly periodFinal: boolean;
parastart: boolean;
linestart: boolean;
sentbreak: boolean;
abbr: boolean;
ellipsis: boolean;
private static readonly RE_NUMERIC;
private static readonly RE_ELLIPSIS;
private static readonly RE_INITIAL;
private static readonly RE_ALPHA;
constructor(tok: string, params?: {
[key: string]: boolean;
});
private getType;
get typeNoPeriod(): string;
get typeNoSentPeriod(): string;
get firstUpper(): boolean;
get firstLower(): boolean;
get firstCase(): "upper" | "lower" | "none";
get isEllipsis(): boolean;
get isNumber(): boolean;
get isInitial(): boolean;
get isAlpha(): boolean;
get isNonPunct(): boolean;
toString(): string;
}
//# sourceMappingURL=token.d.ts.map