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.
npm install typesmatchimporttype{Match}from"typesmatch";interfaceMatch{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.
Eclipse Public License 1.0 — see LICENSE.