@palasimi/ipa-cluster
Version:
Cluster words with similar IPA transcriptions together
22 lines • 697 B
TypeScript
/**
* A trie used for string matching.
*/
export declare class Trie {
private root;
/**
* Adds a sequence to the trie.
* "_"s are ignored.
*
* @param input - Input string to use as transition symbols
* @param language - Language for which the target state of the input is an
* accept state ("_" stands for don't care)
*/
add(input: string[], language?: string): void;
/**
* Checks if the input string brings the trie to an accept state at some
* point for the given language.
* Returns true as soon as an accept state is reached.
*/
test(input: string[], language?: string): boolean;
}
//# sourceMappingURL=trie.d.ts.map