mtengines
Version:
Machine Translation (MT) library written in TypeScript
16 lines (15 loc) • 791 B
TypeScript
import { XMLElement } from "typesxml";
export declare class MTUtils {
static getElementContent(e: XMLElement): string;
static plainText(e: XMLElement): string;
static toXMLElement(text: string): XMLElement;
static getRole(srcLang: string, tgtLang: string): string;
static translatePropmt(source: string, srcLang: string, tgtLang: string): string;
static generatePrompt(source: XMLElement, srcLang: string, tgtLang: string, terms: {
source: string;
target: string;
}[]): string;
static fixTagsPrompt(source: XMLElement, target: XMLElement, srcLang: string, tgtLang: string): string;
static fixMatchPrompt(originalSource: XMLElement, matchSource: XMLElement, matchTarget: XMLElement): string;
static getLanguages(): Promise<string[]>;
}