site/node_modules/speech-rule-engine/js/semantic_tree/semantic_ordering.d.ts

12 lines
690 B
TypeScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import { SemanticMeaning, SemanticType } from './semantic_meaning';
export declare function add(comparator: SemanticComparator): void;
export declare function apply(meaning1: SemanticMeaning, meaning2: SemanticMeaning): number;
export declare function sort(meanings: SemanticMeaning[]): void;
export declare function reduce(meanings: SemanticMeaning[]): SemanticMeaning[];
export declare class SemanticComparator {
comparator: (p1: SemanticMeaning, p2: SemanticMeaning) => number;
type: SemanticType;
constructor(comparator: (p1: SemanticMeaning, p2: SemanticMeaning) => number, type?: SemanticType);
compare(meaning1: SemanticMeaning, meaning2: SemanticMeaning): number;
}