Skip to main content
Module

x/bertml/mod.ts>TranslationModel

Use common pre-trained ML models in Deno!
Latest
class TranslationModel
extends Model
import { TranslationModel } from "https://deno.land/x/bertml@v0.1.0-alpha2/mod.ts";

A model for translating text from any of the given source languages to any of the given target languages.

Constructors

new
TranslationModel(
manager: ModelManager,
rid: number,
init: T,
)

Methods

translate(init: TranslateInit<T>): Promise<string[]>

Translates the given text in the source language into the target language.