import Yomikun from "../api/yomikun.ts"; import DirectCoreClient from "../core/direct/client.ts"; // Create a direct (local) API instance var api = new Yomikun(new DirectCoreClient()); // Excplicitly wait until everything is ready // await api.ready; // index sentence (generates wrong readings) var sentence = await api.sentence("日本に来て一番驚いたことは自動販売機の多さだ。"); // generated reading (wrong) console.log(sentence.furigana()); // insert parser break sentence.break(sentence.at("漢字")); // generated reading (correct) console.log(sentence.furigana());