Watson Developer Cloud Unity SDK
1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
This class wraps the Language Translator service. Language Translator Service More...
Public Types | |
enum | TypeFilter { TypeFilter.DEFAULT, TypeFilter.NON_DEFAULT, TypeFilter.ALL } |
This determines the types of models to return with GetModels. More... | |
Public Member Functions | |
delegate void | GetModelsCallback (TranslationModels models, string customData) |
Callback for GetModels() method. More... | |
delegate void | GetModelCallback (TranslationModel model, string customData) |
Callback for GetModel() method. More... | |
delegate void | DeleteModelCallback (bool success, string customData) |
Callback for DeleteModel() method. More... | |
delegate void | GetLanguagesCallback (Languages languages, string customData) |
Callback for GetLanguages() method. More... | |
delegate void | IdentifyCallback (string languages, string customData) |
Callback for Identify() method. More... | |
delegate void | TranslateCallback (Translations translation, string customData) |
Callback for Translate() method. More... | |
LanguageTranslator (Credentials credentials) | |
bool | GetTranslation (string text, string model_id, TranslateCallback callback) |
Translate the provided text using the specified model. More... | |
bool | GetTranslation (string text, string source, string target, TranslateCallback callback) |
Translate the provided text using the specified source and target. More... | |
bool | GetModels (GetModelsCallback callback, string sourceFilter=null, string targetFilter=null, TypeFilter defaults=TypeFilter.ALL) |
Retrieve the translation models with optional filters. More... | |
bool | GetModel (GetModelCallback callback, string model_id) |
Get a specific model by it's ID. More... | |
delegate void | OnCreateModel (TranslationModel resp, string customData) |
The callback used by CreateModel More... | |
bool | CreateModel (OnCreateModel callback, string baseModelId, string customModelName, string forcedGlossaryFilePath=default(string), string parallelCorpusFilePath=default(string), string monolingualCorpusFilePath=default(string), string customData=default(string)) |
Uploads a TMX glossary file on top of a domain to customize a translation model. More... | |
bool | DeleteModel (DeleteModelCallback callback, string model_id) |
Delete a specific model by it's ID. More... | |
bool | GetLanguages (GetLanguagesCallback callback) |
This function returns a list to the callback of all identifiable languages. More... | |
bool | Identify (IdentifyCallback callback, string text) |
Identifies a language from the given text. More... | |
string | GetServiceID () |
<exclude> More... | |
Properties | |
string | Url [get, set] |
Gets and sets the endpoint URL for the service. More... | |
Credentials | Credentials [get, set] |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More... | |
This class wraps the Language Translator service. Language Translator Service
|
inline |
|
inline |
Uploads a TMX glossary file on top of a domain to customize a translation model.
callback | The OnCreateModel callback. |
baseModelId | Specifies the domain model that is used as the base for the training. To see current supported domain models, use the GET /v2/models parameter.. |
customModelName | The model name. Valid characters are letters, numbers, -, and _. No spaces. |
forcedGlossaryFilePath | A TMX file with your customizations. The customizations in the file completely overwrite the domain data translation, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call. |
parallelCorpusFilePath | A TMX file that contains entries that are treated as a parallel corpus instead of a glossary. |
monolingualCorpusFilePath | A UTF-8 encoded plain text file that is used to customize the target language model. |
customData | User defined custom string data. |
|
inline |
Delete a specific model by it's ID.
model_id | The model to delete. |
callback | The DeleteModel callback. |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.DeleteModelCallback | ( | bool | success, |
string | customData | ||
) |
Callback for DeleteModel() method.
success | Was the model deleted? |
customData | User defined custom data |
|
inline |
This function returns a list to the callback of all identifiable languages.
callback | The callback to invoke with a Language array, null on error. |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.GetLanguagesCallback | ( | Languages | languages, |
string | customData | ||
) |
Callback for GetLanguages() method.
languages | |
customData | User defined custom data |
|
inline |
Get a specific model by it's ID.
model_id | |
callback |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.GetModelCallback | ( | TranslationModel | model, |
string | customData | ||
) |
Callback for GetModel() method.
model | |
customData | User defined custom data |
|
inline |
Retrieve the translation models with optional filters.
callback | The callback to invoke with the array of models. |
sourceFilter | Optional source language filter. |
targetFilter | Optional target language filter. |
defaults | Controls if we get default, non-default, or all models. |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.GetModelsCallback | ( | TranslationModels | models, |
string | customData | ||
) |
Callback for GetModels() method.
models | |
customData | User defined custom data |
|
inline |
<exclude>
Implements IBM.Watson.DeveloperCloud.Services.IWatsonService.
|
inline |
Translate the provided text using the specified model.
text | The text to translate. |
model_id | The ID of the model to use. |
callback | The callback to receive the translated text. |
|
inline |
Translate the provided text using the specified source and target.
text | The text to translate. |
source | The ID of the source language. |
target | The ID of the target language. |
callback | The callback to receive the translated text. |
|
inline |
Identifies a language from the given text.
text | The text sample to ID. |
callback | The callback to receive the results. |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.IdentifyCallback | ( | string | languages, |
string | customData | ||
) |
Callback for Identify() method.
languages | |
customData | User defined custom data |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.OnCreateModel | ( | TranslationModel | resp, |
string | customData | ||
) |
The callback used by CreateModel
resp | The TranslationModel response. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v2.LanguageTranslator.TranslateCallback | ( | Translations | translation, |
string | customData | ||
) |
Callback for Translate() method.
translation | |
customData | User defined custom data |
|
getset |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.
|
getset |
Gets and sets the endpoint URL for the service.