Skip to content

maxprograms-com/TypesMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypesMatch

TypesMatch defines the Match type shared by translation memory and machine translation engines: TypesTM, TypesRemoteTM, HybridTM, and mtengines all use it, so a result from any of them is interchangeable with any other.

Installation

npm install typesmatch

The 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, as typesxml XMLElements.
  • origin — the name of the memory, server, or MT provider the match came from.
  • type — what kind of match this is (for example tm, mt, or am).
  • similarity — a 0-100 match quality score.
  • properties — arbitrary metadata attached to the match (for example creationdate).

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.

About

Shared Match type for Translation Memory and Machine Translation engines

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors