
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
TypeScript library for Machine Translation (MT) using various engines. It provides a unified interface to interact with different MT and AI services, allowing you to translate text between multiple languages.
Interface MTEngine
provides these methods:
getName(): string;
getShortName(): string;
getSourceLanguages(): Promise<string[]>;
getTargetLanguages(): Promise<string[]>;
setSourceLanguage(lang: string): void;
getSourceLanguage(): string;
setTargetLanguage(lang: string): void;
getTargetLanguage(): string;
translate(source: string): Promise<string>;
getMTMatch(source: string): Promise<MTMatch>;
handlesTags(): boolean;
fixesMatches(): boolean;
fixMatch(originalSource: XMLElement, matchSource: XMLElement, matchTarget: XMLElement): Promise<MTMatch>;
fixesTags(): boolean;
fixTags(source: XMLElement, target: XMLElement): Promise<XMLElement>;
All supported engines implement the MTEngine
interface. Methods fixMatch()
and fixTags()
are only implemented by AI-based engines (ChatGPTTranslator
and AnthropicTranslator
), all other engines throw an error when they are called.
npm install mtengines
import { GoogleTranslator } from "mtengines";
class TestGoogle {
constructor() {
let translator: GoogleTranslator = new GoogleTranslator('yourApiKey');
translator.setSourceLanguage("en");
translator.setTargetLanguage("ja");
translator.translate("Hello World").then((result: string) => {
console.log(result);
}, (error: any) => {
console.error(error);
});
}
}
new TestGoogle();
FAQs
Machine Translation (MT) library written in TypeScript
The npm package mtengines receives a total of 98 weekly downloads. As such, mtengines popularity was classified as not popular.
We found that mtengines demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.