UNPKG

@awesome-fe/translate

Version:
26 lines (25 loc) 826 B
import { TranslationEngine } from './translation-engine'; import { SentenceFormat } from '../translator/sentence-format'; import { TranslationPair } from '../translator/translation-pair'; interface VectorEntry { english: string; englishVector: number[]; chinese: string; chineseVector: number[]; distance: number; } export declare class VectorizerEngine extends TranslationEngine { private options; constructor(options?: { dict?: string; cwd?: string; }); private _entries; get entries(): Readonly<VectorEntry>[]; private getDictFilename; protected batchTranslate(sentences: TranslationPair[], format: SentenceFormat): Promise<TranslationPair[]>; setup(currentFile: string): Promise<void>; tearDown(): Promise<void>; private getVectors; } export {};