gate.creole.ml
Class MachineLearningPR
java.lang.Object
gate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractProcessingResource
gate.creole.AbstractLanguageAnalyser
gate.creole.ml.MachineLearningPR
- All Implemented Interfaces:
- ActionsPublisher, ANNIEConstants, Executable, FeatureBearer, LanguageAnalyser, NameBearer, ProcessingResource, Resource, Serializable
- public class MachineLearningPR
- extends AbstractLanguageAnalyser
- implements ActionsPublisher
This processing resource is used to train a machine learning algorithm with
data extracted from a corpus.
- See Also:
- Serialized Form
Fields inherited from interface gate.creole.ANNIEConstants |
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DOCUMENT_COREF_FEATURE_NAME, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_CLASS_FEATURE_NAME, LOOKUP_MAJOR_TYPE_FEATURE_NAME, LOOKUP_MINOR_TYPE_FEATURE_NAME, LOOKUP_ONTOLOGY_FEATURE_NAME, MONEY_ANNOTATION_TYPE, ORGANIZATION_ANNOTATION_TYPE, PERSON_ANNOTATION_TYPE, PERSON_GENDER_FEATURE_NAME, PR_NAMES, SENTENCE_ANNOTATION_TYPE, SPACE_TOKEN_ANNOTATION_TYPE, TOKEN_ANNOTATION_TYPE, TOKEN_CATEGORY_FEATURE_NAME, TOKEN_KIND_FEATURE_NAME, TOKEN_LENGTH_FEATURE_NAME, TOKEN_ORTH_FEATURE_NAME, TOKEN_STRING_FEATURE_NAME |
Methods inherited from class gate.creole.AbstractProcessingResource |
addProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, interrupt, isInterrupted, reInit, removeProgressListener, removeStatusListener |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
configFileURL
private URL configFileURL
datasetDefinition
protected DatasetDefintion datasetDefinition
engine
protected MLEngine engine
inputASName
protected String inputASName
annotationSet
protected AnnotationSet annotationSet
annotations
protected List annotations
actionList
protected List actionList
cache
protected MachineLearningPR.Cache cache
training
private Boolean training
MachineLearningPR
public MachineLearningPR()
init
public Resource init()
throws ResourceInstantiationException
- Initialise this resource, and return it.
- Specified by:
init
in interface Resource
- Overrides:
init
in class AbstractProcessingResource
- Throws:
ResourceInstantiationException
execute
public void execute()
throws ExecutionException
- Run the resource.
- Specified by:
execute
in interface Executable
- Overrides:
execute
in class AbstractProcessingResource
- Throws:
ExecutionException
updateDocument
protected void updateDocument(Object classificationResult,
int instanceIndex)
getActions
public List getActions()
- Gets the list of actions that can be performed on this resource.
- Specified by:
getActions
in interface ActionsPublisher
- Returns:
- a List of Action objects (or null values)
setInputASName
public void setInputASName(String inputASName)
getInputASName
public String getInputASName()
getConfigFileURL
public URL getConfigFileURL()
setConfigFileURL
public void setConfigFileURL(URL configFileURL)
setTraining
public void setTraining(Boolean training)
getTraining
public Boolean getTraining()
getEngine
public MLEngine getEngine()
setEngine
public void setEngine(MLEngine engine)