taipa
Version:
Taiwanese morphological parsing library
57 lines (56 loc) • 2.63 kB
TypeScript
import { MatchedPattern, Morpheme } from '../unit';
import { MorphemeMaker } from '../maker';
import { Allomorph } from '../tonal/tonalres';
import { AlphabeticLetter, AlphabeticGrapheme, Sound } from '../unit';
import { TonalCombiningMetaplasm, TonalStandaloneMetaplasm } from '../metaplasm';
import { TonalSyllable } from './unit';
export declare function syllabifyTonal(letters: Array<AlphabeticLetter>, beginOfSyllable: number): MatchedPattern;
/** A syllable and its standalone forms. */
export declare class TonalStandaloneMorpheme extends Morpheme {
syllable: TonalSyllable;
allomorph: Allomorph;
private metaplasm;
private forms;
sounds: Array<Sound>;
constructor(syllable: TonalSyllable, sounds: Array<Sound>, metaplasm: TonalCombiningMetaplasm);
getForms(): TonalSyllable[];
addForms(syllables: TonalSyllable[]): void;
private assignAllomorph;
}
export declare class TonalStandaloneMorphemeMaker extends MorphemeMaker {
private sandhiFinals;
private sandhiFinalTonals;
private metaplasm;
constructor(metaplasm: TonalStandaloneMetaplasm);
protected createArray(): TonalStandaloneMorpheme[];
protected createMorpheme(matched: MatchedPattern, metaplasm: TonalStandaloneMetaplasm): TonalStandaloneMorpheme;
private isCombiningAy;
private isCombiningEx;
private isTransfixInflection;
private isDoublet;
private isTriplet;
/** Check if ~ek or ~ekk available for the ~iet syllable. */
private isEkEkkAvailableForRimeIet;
protected preprocess(graphemes: Array<AlphabeticGrapheme>): AlphabeticLetter[];
protected postprocess(matched: MatchedPattern[]): Array<TonalStandaloneMorpheme>;
makeMorphemes(graphemes: Array<AlphabeticGrapheme>): TonalStandaloneMorpheme[];
}
/** A syllable and its sound changing forms. */
export declare class TonalSoundUnchangingMorpheme extends Morpheme {
syllable: TonalSyllable;
sounds: Array<Sound>;
constructor(syllable: TonalSyllable, sounds: Sound[]);
get lastSecondLetter(): string;
uninsertNasal(): TonalSyllable[];
toVoicelessFinal(): TonalSyllable[];
unmutateInitialConsonant(initial: Sound): TonalSyllable[];
unmutateFinalConsonant(initial: Sound): TonalSyllable[];
uninfect(): TonalSyllable[];
}
export declare class TonalSoundUnchangingMorphemeMaker extends MorphemeMaker {
constructor();
protected createArray(): TonalSoundUnchangingMorpheme[];
protected createMorpheme(match: MatchedPattern): TonalSoundUnchangingMorpheme;
private postprocess;
makeMorphemes(graphemes: Array<AlphabeticGrapheme>): TonalSoundUnchangingMorpheme[];
}