UNPKG

fdevsta_monmove

Version:
42 lines (41 loc) 2.59 kB
import * as IMatch from '../match/ifmatch'; import * as Meta from './meta'; export declare function cmpTools(a: IMatch.ITool, b: IMatch.ITool): number; export declare function addBestSplit(mRules: Array<IMatch.mRule>, rule: IMatch.mRule, seenRules: { [key: string]: IMatch.mRule[]; }): void; export declare function getAllDomainsBitIndex(oModel: IMatch.IModels): number; export declare function getDomainBitIndex(domain: string, oModel: IMatch.IModels): number; export declare function splitRules(rules: IMatch.mRule[]): IMatch.SplitRules; export declare function findNextLen(targetLen: number, arr: string[], offsets: number[]): void; export declare function addRangeRulesUnlessPresent(rules: IMatch.mRule[], lcword: string, rangeRules: IMatch.mRule[], presentRulesForKey: IMatch.mRule[], seenRules: any): void; export declare function addCloseExactRangeRules(rules: IMatch.mRule[], seenRules: any): void; export declare function loadModels(modelPath?: string): IMatch.IModels; export declare function sortCategoriesByImportance(map: { [key: string]: IMatch.ICategoryDesc; }, cats: string[]): string[]; export declare function rankCategoryByImportance(map: { [key: string]: IMatch.ICategoryDesc; }, cata: string, catb: string): number; export declare function getOperator(mdl: IMatch.IModels, operator: string): IMatch.IOperator; export declare function getResultAsArray(mdl: IMatch.IModels, a: Meta.IMeta, rel: Meta.IMeta): Meta.IMeta[]; export declare function getCategoriesForDomain(theModel: IMatch.IModels, domain: string): string[]; export declare function getTableColumns(theModel: IMatch.IModels, domain: string): string[]; /** * Return all categories of a domain which can appear on a word, * these are typically the wordindex domains + entries generated by generic rules * * The current implementation is a simplification */ export declare function getPotentialWordCategoriesForDomain(theModel: IMatch.IModels, domain: string): string[]; export declare function getDomainsForCategory(theModel: IMatch.IModels, category: string): string[]; /** * givena set of categories, return a structure * * * { domains : ["DOMAIN1", "DOMAIN2"], * categorySet : { cat1 : true, cat2 : true, ...} * } */ export declare function getDomainCategoryFilterForTargetCategories(model: IMatch.IModels, categories: string[], wordsonly: boolean): IMatch.IDomainCategoryFilter; export declare function getDomainCategoryFilterForTargetCategory(model: IMatch.IModels, category: string, wordsonly: boolean): IMatch.IDomainCategoryFilter;