From f71083781b37cb53ee7770bc960179e9ddab7388 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Mon, 30 Oct 2023 16:17:07 -0400 Subject: [PATCH] Slight updates to language code documentaiton - Document language codes in Wiki #195 (#200) --- src/Serval.Client/Client.g.cs | 34 +++++++------------ .../TranslationEnginesController.cs | 17 ++++------ 2 files changed, 18 insertions(+), 33 deletions(-) diff --git a/src/Serval.Client/Client.g.cs b/src/Serval.Client/Client.g.cs index 1ea0c40f..e1c408ee 100644 --- a/src/Serval.Client/Client.g.cs +++ b/src/Serval.Client/Client.g.cs @@ -803,20 +803,15 @@ public partial interface ITranslationEnginesClient ///
* **targetLanguage**: The target language code (a valid IETF language tag is recommended) ///
* **type**: **SmtTransfer** or **Nmt** or **Echo** ///
### SmtTransfer - ///
The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. - ///
Typical endpoints: translate, get-word-graph, train-segment + ///
The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. Typical endpoints: translate, get-word-graph, train-segment ///
### Nmt - ///
The Neural Machine Translation engine is primarily used for pretranslations. It is - ///
fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). - ///
If you use a language among NLLB's supported languages, - ///
Serval will utilize everything the NLLB-200 model already knows about that language when translating. - ///
If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + ///
The Neural Machine Translation engine is primarily used for pretranslations. It is fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). See more about language tag resolution [here](https://github.com/sillsdev/serval/wiki/Language-Tag-Resolution-for-NLLB%E2%80%90200). + ///
+ ///
If you use a language among NLLB's supported languages, Serval will utilize everything the NLLB-200 model already knows about that language when translating. If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + ///
///
Typical endpoints: pretranslate ///
### Echo - ///
The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build - ///
return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user - ///
in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would - ///
yield a translation response with translation "test". This engine is useful for debugging and testing purposes. + ///
The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would yield a translation response with translation "test". This engine is useful for debugging and testing purposes. ///
## Sample request: ///
///
{ @@ -1208,20 +1203,15 @@ public string BaseUrl ///
* **targetLanguage**: The target language code (a valid IETF language tag is recommended) ///
* **type**: **SmtTransfer** or **Nmt** or **Echo** ///
### SmtTransfer - ///
The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. - ///
Typical endpoints: translate, get-word-graph, train-segment + ///
The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. Typical endpoints: translate, get-word-graph, train-segment ///
### Nmt - ///
The Neural Machine Translation engine is primarily used for pretranslations. It is - ///
fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). - ///
If you use a language among NLLB's supported languages, - ///
Serval will utilize everything the NLLB-200 model already knows about that language when translating. - ///
If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + ///
The Neural Machine Translation engine is primarily used for pretranslations. It is fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). See more about language tag resolution [here](https://github.com/sillsdev/serval/wiki/Language-Tag-Resolution-for-NLLB%E2%80%90200). + ///
+ ///
If you use a language among NLLB's supported languages, Serval will utilize everything the NLLB-200 model already knows about that language when translating. If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + ///
///
Typical endpoints: pretranslate ///
### Echo - ///
The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build - ///
return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user - ///
in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would - ///
yield a translation response with translation "test". This engine is useful for debugging and testing purposes. + ///
The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would yield a translation response with translation "test". This engine is useful for debugging and testing purposes. ///
## Sample request: ///
///
{ diff --git a/src/Serval.Translation/Controllers/TranslationEnginesController.cs b/src/Serval.Translation/Controllers/TranslationEnginesController.cs index e3efd9de..28f0c510 100644 --- a/src/Serval.Translation/Controllers/TranslationEnginesController.cs +++ b/src/Serval.Translation/Controllers/TranslationEnginesController.cs @@ -91,20 +91,15 @@ CancellationToken cancellationToken /// * **targetLanguage**: The target language code (a valid IETF language tag is recommended) /// * **type**: **SmtTransfer** or **Nmt** or **Echo** /// ### SmtTransfer - /// The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. - /// Typical endpoints: translate, get-word-graph, train-segment + /// The Statistical Machine Translation Transfer Learning engine is primarily used for translation suggestions. Typical endpoints: translate, get-word-graph, train-segment /// ### Nmt - /// The Neural Machine Translation engine is primarily used for pretranslations. It is - /// fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). - /// If you use a language among NLLB's supported languages, - /// Serval will utilize everything the NLLB-200 model already knows about that language when translating. - /// If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + /// The Neural Machine Translation engine is primarily used for pretranslations. It is fine-tuned from Meta's NLLB-200. Valid IETF language tags provided to Serval will be converted to [NLLB-200 codes](https://github.com/facebookresearch/flores/tree/main/flores200#languages-in-flores-200). See more about language tag resolution [here](https://github.com/sillsdev/serval/wiki/Language-Tag-Resolution-for-NLLB%E2%80%90200). + /// + /// If you use a language among NLLB's supported languages, Serval will utilize everything the NLLB-200 model already knows about that language when translating. If the language you are working with is not among NLLB's supported languages, the language code will have no effect. + /// /// Typical endpoints: pretranslate /// ### Echo - /// The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build - /// return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user - /// in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would - /// yield a translation response with translation "test". This engine is useful for debugging and testing purposes. + /// The Echo engine has full coverage of all Nmt and SmtTransfer endpoints. Endpoints like create and build return empty responses. Endpoints like translate and get-word-graph echo the sent content back to the user in a format that mocks Nmt or Smt. For example, translating a segment "test" with the Echo engine would yield a translation response with translation "test". This engine is useful for debugging and testing purposes. /// ## Sample request: /// /// {