Package net.sf.okapi.steps.enrycher
Class EnrycherClient
- java.lang.Object
-
- net.sf.okapi.steps.enrycher.EnrycherClient
-
public class EnrycherClient extends Object
Provides a wrapper to easily call the Enrycher web service.
-
-
Constructor Summary
Constructors Constructor Description EnrycherClient()Creates a default client object with "en" as the default locale, and the default paameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParametersgetParameters()Gets the current parameters for this client.protected voidparseHTML(String htmlResult, LinkedList<ITextUnit> list)StringprocessContent(String text)Sends an HTML string to the service and get back the same string with Enrycher's ITS annotations.voidprocessList(LinkedList<ITextUnit> list)Call the Enrycher service on a list of text units.voidsetLocale(LocaleId locId)Sets the locale to use when invoking the Enrycher service.voidsetParameters(Parameters params)Sets the parameters for this client.Stringunwrap(String text)
-
-
-
Method Detail
-
getParameters
public Parameters getParameters()
Gets the current parameters for this client.- Returns:
- the current parameters for this client.
-
setParameters
public void setParameters(Parameters params)
Sets the parameters for this client.- Parameters:
params- the new parameters to use.
-
setLocale
public void setLocale(LocaleId locId)
Sets the locale to use when invoking the Enrycher service.- Parameters:
locId- the locale to use.
-
processContent
public String processContent(String text)
Sends an HTML string to the service and get back the same string with Enrycher's ITS annotations.- Parameters:
text- the HTML string to process.- Returns:
- the annotated HTML string.
-
processList
public void processList(LinkedList<ITextUnit> list)
Call the Enrycher service on a list of text units. they can be segmented or not. Only the source content is annotated. the target content is not touched.- Parameters:
list- the list to process.
-
parseHTML
protected void parseHTML(String htmlResult, LinkedList<ITextUnit> list)
-
-