LanguageIdentifierBuilder
to create an
Annotator
.
Factory to create LanguageIdentifier instances.
Set the license with the factory, and set LanguageIdentifier
options within the instance.@Deprecated public final class LanguageIdentifierFactory extends Object
Constructor and Description |
---|
LanguageIdentifierFactory(File licenseFromFile)
Deprecated.
Construct a factory using a license from a File.
|
LanguageIdentifierFactory(InputStream licenseFromStream)
Deprecated.
Construct a factory using a license from an InputStream.
|
LanguageIdentifierFactory(String licenseFromXML)
Deprecated.
Construct a factory using a license from an XML-formatted String.
|
Modifier and Type | Method and Description |
---|---|
LanguageIdentifier |
create()
Deprecated.
Factory method for creating a LanguageIdentifier instance.
|
Annotator |
createLanguageAnnotator()
Deprecated.
Create a data model annotator that does single-language detection.
|
Annotator |
createLanguageRegionAnnotator()
Deprecated.
Create a data model annotator that reads sentence and script information
and adds language region information.
|
double |
getAmbiguityThreshold()
Deprecated.
|
double |
getInvalidityThreshold()
Deprecated.
|
EnumMap<LanguageCode,Integer> |
getLanguageWeightAdjustments()
Deprecated.
|
int |
getMaxRegion()
Deprecated.
|
int |
getMinRegion()
Deprecated.
|
int |
getProfileDepth()
Deprecated.
|
boolean |
isBreakRegionOnScriptBoundary()
Deprecated.
|
void |
setAmbiguityThreshold(double ambiguityThreshold)
Deprecated.
Set the ambiguity threshold used by the region locator.
|
void |
setBreakRegionOnScriptBoundary(boolean breakRegionOnScriptBoundary)
Deprecated.
|
void |
setInvalidityThreshold(double invalidityThreshold)
Deprecated.
Set the invalidity threshold used by the region locator.
|
void |
setMaxRegion(int maxRegion)
Deprecated.
set the maximum region length (amount of text examined in a script region)
for the language region detector.
|
void |
setMinRegion(int minRegion)
Deprecated.
Set the minimum length for a region.
|
void |
setProfileDepth(int profileDepth)
Deprecated.
Set the profile depth used for the region detector.
|
public LanguageIdentifierFactory(InputStream licenseFromStream) throws RosetteCorruptLicenseException, RosetteExpiredLicenseException, RosetteNoLicenseException
licenseFromStream
- InputStream containing a valid licenseRosetteCorruptLicenseException
- if stream cannot be readRosetteExpiredLicenseException
- if the given license has expiredRosetteNoLicenseException
- if the stream is emptypublic LanguageIdentifierFactory(String licenseFromXML) throws RosetteCorruptLicenseException, RosetteExpiredLicenseException, RosetteNoLicenseException
licenseFromXML
- XML-formatted String containing a valid licenseRosetteCorruptLicenseException
- if the license cannot be read from the StringRosetteExpiredLicenseException
- if the given license has expiredRosetteNoLicenseException
- if the String is emptypublic LanguageIdentifierFactory(File licenseFromFile) throws RosetteCorruptLicenseException, RosetteExpiredLicenseException, RosetteNoLicenseException
licenseFromFile
- XML file containing a valid licenseRosetteCorruptLicenseException
- if the File cannot be readRosetteExpiredLicenseException
- if the given license has expiredRosetteNoLicenseException
- if the File is emptypublic LanguageIdentifier create() throws RosetteExpiredLicenseException
RosetteExpiredLicenseException
- if the supplied license
has expired.public Annotator createLanguageAnnotator() throws RosetteException
RosetteException
public Annotator createLanguageRegionAnnotator()
public boolean isBreakRegionOnScriptBoundary()
public void setBreakRegionOnScriptBoundary(boolean breakRegionOnScriptBoundary)
breakRegionOnScriptBoundary
- public int getProfileDepth()
public void setProfileDepth(int profileDepth)
profileDepth
- the profile depth.public int getMaxRegion()
public void setMaxRegion(int maxRegion)
maxRegion
- the length in chars.public int getMinRegion()
public void setMinRegion(int minRegion)
minRegion
- the minimum region length in chars.public EnumMap<LanguageCode,Integer> getLanguageWeightAdjustments()
EnumMap
to set their options.public double getAmbiguityThreshold()
public void setAmbiguityThreshold(double ambiguityThreshold)
ambiguityThreshold
- the threshold.public double getInvalidityThreshold()
public void setInvalidityThreshold(double invalidityThreshold)
invalidityThreshold
- the threshold.Copyright © 2016 Basis Technology Corporation. All Rights Reserved.