UNPKG

@palasimi/ipa-cluster

Version:

Cluster words with similar IPA transcriptions together

30 lines 888 B
import { SplitRule } from "./split"; /** * Queries should match some `Context` stored in a `ContextMatcher`. */ export type Context = SplitRule; /** * Context matcher. */ export declare class ContextMatcher { private leftBeforeTrie; private leftAfterTrie; private rightBeforeTrie; private rightAfterTrie; /** * Adds a context to the `ContextMatcher`. */ add(context: Context): void; /** * Tests if `s[i]` and `t[j]` match any of the stored contexts. * * @param s - An array of IPA segments * @param t - An array of IPA segments * @param i - Index to an element in `s` * @param j - Index to an element in `t` * @param l1 - Language of `s` * @param l2 - Language of `t` */ test(s: string[], t: string[], i: number, j: number, l1: string, l2: string): boolean; } //# sourceMappingURL=context.d.ts.map