UNPKG

@leolee9086/string-metrics-dice

Version:
60 lines (54 loc) 1.59 kB
/** * String Metrics Dice - 高性能 Sørensen-Dice 系数算法库 * * 提供多种实现变体的竞争系统,自动选择最优算法版本 */ // 导出主要功能 export { computeDiceCoefficient, computeDiceDistance, getCurrentAlgorithm, getAllAlgorithms, 计算Dice系数, 计算Dice距离, 获取当前算法, 获取所有算法 } from './algorithms/dice.js'; // 导出类型定义和工具函数 export { DEFAULT_OPTIONS, validateOptions, preprocessString, generateNGrams, computeIntersectionSize } from './types.js'; // 导出WASM版本(需要单独导入) export { init as initWasm, isReady as isWasmReady, computeDiceCoefficient as computeDiceCoefficientWasm, computeDiceDistance as computeDiceDistanceWasm, getAlgorithmInfo as getWasmAlgorithmInfo, benchmark as benchmarkWasm } from './wasm/index.js'; // 导出类型定义(JSDoc) /** * @typedef {import('./types.js').DiceCoefficientOptions} DiceCoefficientOptions * @typedef {import('./types.js').DiceCoefficientResult} DiceCoefficientResult * @typedef {import('./types.js').AlgorithmMetadata} AlgorithmMetadata * @typedef {import('./types.js').StringDistanceAlgorithm} StringDistanceAlgorithm */ // 版本信息 export const VERSION = '1.0.0'; export const AUTHOR = '织'; export const DESCRIPTION = '高性能 Sørensen-Dice 系数算法库'; /** * 获取库的版本信息 * @returns {Object} 版本信息 */ export const getVersionInfo = () => ({ version: VERSION, author: AUTHOR, description: DESCRIPTION, buildTime: new Date().toISOString() });