@palasimi/ipa-cluster
Version:
Cluster words with similar IPA transcriptions together
29 lines • 844 B
TypeScript
import { AlignedIR } from "./align";
import { Constraint } from "./ir";
/**
* A `SplitRule` is a rule for comparing a pair of sounds within a word
* (e.g. `a ~ b`).
* However, it only applies when the sounds are in the appropriate context.
*/
export type SplitRule = {
constraint: Constraint;
left: string;
right: string;
leftBeforeContext: string[];
leftAfterContext: string[];
rightBeforeContext: string[];
rightAfterContext: string[];
};
/**
* A collection of `SplitRule`s.
*/
export type SplitIR = {
rules: SplitRule[];
};
/**
* Compiles an `AlignedIR` into a `SplitIR`.
* Splits each rule into simpler rules of the form `a ~ b`.
* Also rearranges rules so that the left-hand side <= the right-hand side.
*/
export declare function split(ir: AlignedIR): SplitIR;
//# sourceMappingURL=split.d.ts.map