/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
import { PhraseClassifier, prepareLocaleIndex } from "mailwoman/core";
/**
 * Chain-restaurants and other franchises.
 */
export class ChainClassifier extends PhraseClassifier {
    async ready() {
        this.index = await prepareLocaleIndex(this.languages, "chains.txt");
        return this;
    }
    explore(span) {
        const languages = this.index.get(span.normalized);
        if (languages) {
            span.classifications.add({
                classification: "chain",
                languages,
            });
        }
    }
}
//# sourceMappingURL=ChainClassifier.js.map