Class ModelMapUtil
- java.lang.Object
-
- net.sf.okapi.connectors.googleautoml.util.ModelMapUtil
-
public class ModelMapUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ModelMapUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetModelResourceName(String sourceCode, String targetCode)Gets the model resource name for a given language pair.voidsetMap(String modelMap)Sets the map for this object.
-
-
-
Method Detail
-
setMap
public void setMap(String modelMap)
Sets the map for this object.- Parameters:
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"}
-
getModelResourceName
public String getModelResourceName(String sourceCode, String targetCode)
Gets the model resource name for a given language pair.- Parameters:
sourceCode- the code of the source language (not case-sensitive)targetCode- the code of the target language (not case-sensitive)- Returns:
- the model resource name for the given language pair.
- Throws:
OkapiException- if the language pair is not found.
-
-