/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
import { Alpha2LanguageCode, prepareLocaleIndex, WordClassifier } from "mailwoman/core";
export class LevelDesignatorClassifier extends WordClassifier {
    async ready() {
        const languages = this.languages ?? [Alpha2LanguageCode.English];
        this.index = await prepareLocaleIndex(languages, "level_types_numbered.txt");
        return this;
    }
    explore(span) {
        if (span.flags.has("numeral"))
            return;
        if (this.index.has(span.normalized)) {
            span.classifications.add("level_designator");
        }
    }
}
//# sourceMappingURL=LevelDesignatorClassifier.js.map