26 lines
596 B
TypeScript
26 lines
596 B
TypeScript
declare module "kuroshiro" {
|
|
interface ConvertOptions {
|
|
to?: "hiragana" | "katakana" | "romaji";
|
|
mode?: "normal" | "spaced" | "okurigana" | "furigana";
|
|
romajiSystem?: "nippon" | "passport" | "hepburn";
|
|
delimiter_start?: string;
|
|
delimiter_end?: string;
|
|
}
|
|
|
|
class Kuroshiro {
|
|
constructor();
|
|
init(analyzer: any): Promise<void>;
|
|
convert(text: string, options?: ConvertOptions): Promise<string>;
|
|
}
|
|
|
|
export = Kuroshiro;
|
|
}
|
|
|
|
declare module "kuroshiro-analyzer-mecab" {
|
|
class KuroshiroAnalyzerMecab {
|
|
constructor();
|
|
}
|
|
|
|
export = KuroshiroAnalyzerMecab;
|
|
}
|