Table of Contents

Constructor TextTranslation

Namespace
LMKit.Translation
Assembly
LM-Kit.NET.dll

TextTranslation(LM)

Initializes a new instance of the TextTranslation class.

public TextTranslation(LM model)

Parameters

model LM

A LM object that specifies the LM model to be inferred by the instance; cannot be null.

Examples

using LMKit.Translation;
using LMKit.Model;

// Initialize the language model (LM)
LM languageModel = new LM("path/to/your/model");

// Create an instance of TextTranslation using the LM
TextTranslation textTranslation = new TextTranslation(languageModel);

Exceptions

ArgumentNullException

Thrown when the provided model argument is null.

InvalidModelException

Thrown when the provided model does not meet the required specifications or is incompatible with the TextTranslation service.