public class ModelMapUtil extends Object
| Constructor and Description |
|---|
ModelMapUtil() |
| Modifier and Type | Method and Description |
|---|---|
String |
getModelResourceName(String sourceCode,
String targetCode)
Gets the model resource name for a given language pair.
|
void |
setMap(String modelMap)
Sets the map for this object.
|
public void setMap(String modelMap)
modelMap - the JSON map to store.
The expected format is for example: {"en-US/ja-JP": "projects/my-project/locations/us-central1/models/ABC123",
"en-US/de-DE": "projects/my-project/locations/us-central1/models/DEF456"}public String getModelResourceName(String sourceCode, String targetCode)
sourceCode - the code of the source language (not case-sensitive)targetCode - the code of the target language (not case-sensitive)OkapiException - if the language pair is not found.Copyright © 2019. All rights reserved.