typesmatch
v0.2.0
Published
Shared Match type for Translation Memory and Machine Translation engines
Downloads
215
Maintainers
Readme
TypesMatch
TypesMatch defines the Match type shared by translation memory and machine translation engines: TypesMem, TypesRestMem, HybridTM, and MTEngines all use it, so a result from any of them is interchangeable with any other.
Installation
npm install typesmatchThe Match type
import type { Match } from "typesmatch";
interface Match {
id: string;
source: XMLElement;
target: XMLElement;
origin: string;
type: string;
similarity: number;
properties: Record<string, string>;
}id— an identifier for the match, unique within whatever produced it.source/target— the matched segment pair, astypesxmlXMLElements.origin— the name of the memory, server, or MT provider the match came from.type— what kind of match this is (for exampletm,mt, oram).similarity— a 0-100 match quality score.properties— arbitrary metadata attached to the match (for examplecreationdate).
This package has no logic of its own — it exists only so every engine that produces a Match agrees on its shape without depending on any one engine's implementation package.
License
Eclipse Public License 1.0 — see LICENSE.
