public class LanguageExtraction
extends java.lang.Object
implements org.ow2.weblab.core.services.Analyser
null, nothing is
annotated.falsetruenull in this case, no isProducedBy annotation will be created.| Constructor and Description |
|---|
LanguageExtraction()
The default constructor that initialises each parameter as state in the class header.
|
LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath) |
LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject) |
LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject,
java.lang.String unknownLanguageCode) |
LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject,
java.lang.String unknownLanguageCode,
double minSingleValue,
double minMultipleValue) |
| Modifier and Type | Method and Description |
|---|---|
NGramProfilesPatched |
loadProfiles(java.lang.String profilesFolderPath)
Loads a NGramProfilesPatched from the parameter or uses default one (if null or empty).
|
org.ow2.weblab.core.services.analyser.ProcessReturn |
process(org.ow2.weblab.core.services.analyser.ProcessArgs processArgs) |
java.lang.String |
toString() |
public LanguageExtraction()
public LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath)
maxNbValues - It's a positive integer value. The list of annotated language on a given Text could not be greater that this value.addTopLevelAnnot - It's a boolean value. It defines whether or not to annotate the whole document with the language extracted from the concatenation of every
Text content.addMediaUnitLevelAnnot - It's a boolean value. It defines whether or not to annotate the each Text section with the language guessed.profilesFolderPath - It's a String that represents a folder path; This folder contains .ngp files that will be loaded instead of default CNGram 28 languages.public LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject)
maxNbValues - It's a positive integer value. The list of annotated language on a given Text could not be greater that this value.addTopLevelAnnot - It's a boolean value. It defines whether or not to annotate the whole document with the language extracted from the concatenation of every
Text content.addMediaUnitLevelAnnot - It's a boolean value. It defines whether or not to annotate the each Text section with the language guessed.profilesFolderPath - It's a String that represents a folder path; This folder contains .ngp files that will be loaded instead of default CNGram 28 languages.isProducedByObject - It's a String value that should be a valid URI. It defines the URI to be used as object of every isProducedBy statements on
annotations created by the service.public LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject,
java.lang.String unknownLanguageCode)
maxNbValues - It's a positive integer value. The list of annotated language on a given Text could not be greater that this value.addTopLevelAnnot - It's a boolean value. It defines whether or not to annotate the whole document with the language extracted from the concatenation of every
Text content.addMediaUnitLevelAnnot - It's a boolean value. It defines whether or not to annotate the each Text section with the language guessed.profilesFolderPath - It's a String that represents a folder path; This folder contains .ngp files that will be loaded instead of default CNGram 28 languages.isProducedByObject - It's a String value that should be a valid URI. It defines the URI to be used as object of every isProducedBy statements on annotations
created by the service.unknownLanguageCode - It's the String value that will be annotated when no language can be clearly identified. When null, nothing is annotated.public LanguageExtraction(int maxNbValues,
boolean addTopLevelAnnot,
boolean addMediaUnitLevelAnnot,
java.lang.String profilesFolderPath,
java.lang.String isProducedByObject,
java.lang.String unknownLanguageCode,
double minSingleValue,
double minMultipleValue)
maxNbValues - It's a positive integer value. The list of annotated language on a given Text could not be greater that this value.addTopLevelAnnot - It's a boolean value. It defines whether or not to annotate the whole document with the language extracted from the concatenation of every
Text content.addMediaUnitLevelAnnot - It's a boolean value. It defines whether or not to annotate the each Text section with the language guessed.profilesFolderPath - It's a String that represents a folder path; This folder contains .ngp files that will be loaded instead of default CNGram 28 languages.isProducedByObject - It's a String value that should be a valid URI. It defines the URI to be used as object of every isProducedBy statements on annotations
created by the service.unknownLanguageCode - It's the String value that will be annotated when no language can be clearly identified. When null, nothing is annotated.minSingleValue - It's a double value between 0 and 1. If the best language score is greater than this value, it will be the only one annotated on a given Text.minMultipleValue - It's a double value between 0 and 1. Every language score that are greater than this value, will be annotated on a given Text.public NGramProfilesPatched loadProfiles(java.lang.String profilesFolderPath)
profilesFolderPath - The path to a folder to be loaded. If null or empty, uses default profiles shipped with NGramJInitialisationException - If the initialisation failspublic org.ow2.weblab.core.services.analyser.ProcessReturn process(org.ow2.weblab.core.services.analyser.ProcessArgs processArgs)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.UnexpectedException
process in interface org.ow2.weblab.core.services.Analyserorg.ow2.weblab.core.services.InvalidParameterExceptionorg.ow2.weblab.core.services.UnexpectedExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2004-2012. All Rights Reserved.