Class GoogleAutoMLTranslationAPIImpl
- java.lang.Object
-
- net.sf.okapi.connectors.googleautoml.GoogleAutoMLTranslationAPIImpl
-
- All Implemented Interfaces:
GoogleAutoMLTranslationAPI
public class GoogleAutoMLTranslationAPIImpl extends Object implements GoogleAutoMLTranslationAPI
-
-
Constructor Summary
Constructors Constructor Description GoogleAutoMLTranslationAPIImpl(String baseUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringpredict(String sourceText, String modelResourceName, GoogleOAuth2Service service)Performs a prediction using the model with the given resource name and returns the translated text.
-
-
-
Constructor Detail
-
GoogleAutoMLTranslationAPIImpl
public GoogleAutoMLTranslationAPIImpl(String baseUrl)
-
-
Method Detail
-
predict
public String predict(String sourceText, String modelResourceName, GoogleOAuth2Service service) throws IOException, org.json.simple.parser.ParseException
Description copied from interface:GoogleAutoMLTranslationAPIPerforms a prediction using the model with the given resource name and returns the translated text.- Specified by:
predictin interfaceGoogleAutoMLTranslationAPI- Throws:
IOExceptionorg.json.simple.parser.ParseException
-
-