import Core from "../core/api.ts"; import RemoteCoreClient from "../core/http/client.ts"; import { ParseResult } from "../language/types.ts"; import Sentence from "./sentence.ts"; export default class Yomikun { protected core: Core; public ready: Promise; constructor(core?: Core) { this.core = core ?? new RemoteCoreClient(); this.ready = new Promise(async resolve => { await this.core.ready; resolve(); }) } async sentence(input: string): Promise { var sentence = new Sentence(input).withParent(this); await sentence.ready; return sentence; } }