|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractProcessingResource
gate.creole.AbstractLanguageAnalyser
gate.creole.kea.Kea
public class Kea
This is wrapper for using the KEA Keyphrase extractor (http://www.nzdl.org/Kea/) within the GATE Language Engineering architecture (http://gate.ac.uk). It exposes KEA as a GATE Processing Resource that has two functioning modes:
Nested Class Summary | |
---|---|
protected class |
Kea.LoadModelAction
Action for loading a saved model. |
protected class |
Kea.SaveModelAction
Action used to save a trained model. |
Nested classes/interfaces inherited from class gate.creole.AbstractProcessingResource |
---|
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener |
Field Summary | |
---|---|
protected List |
actions
The list of GUI actions available from this PR on popup menus. |
protected weka.core.FastVector |
atts
Data structure used internally to define the dataset. |
protected weka.core.Instances |
data
The dataset. |
protected kea.KEAFilter |
keaFilter
The KEA filter object which incorporates the actual model. |
protected boolean |
trainingFinished
This flag is used to determine whether the model has been constructed or not. |
Fields inherited from class gate.creole.AbstractLanguageAnalyser |
---|
corpus, document |
Fields inherited from class gate.creole.AbstractProcessingResource |
---|
interrupted |
Fields inherited from class gate.creole.AbstractResource |
---|
name |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Constructor Summary | |
---|---|
Kea()
Anonymous constructor, required by GATE. |
Method Summary | |
---|---|
protected void |
annotateKeyPhrases(List phrases)
Annnotates the document with all the occurences of keyphrases from a List. |
void |
execute()
Executes this PR. |
protected void |
finishTraining()
Stops the training phase and builds the actual model. |
List |
getActions()
Gets the list of GUI actions available from this PR. |
Boolean |
getDisallowInternalPeriods()
|
String |
getInputAS()
Gets the name for the input annotation set. |
String |
getKeyphraseAnnotationType()
Sets the annotation type to be used for keyphrases. |
Integer |
getMaxPhraseLength()
|
Integer |
getMinNumOccur()
|
Integer |
getMinPhraseLength()
|
String |
getOutputAS()
Gets the name for the output annotation set. |
Integer |
getPhrasesToExtract()
|
Boolean |
getTrainingMode()
|
Boolean |
getUseKFrequency()
|
Resource |
init()
Initialises this KEA Processing Resource. |
protected void |
initModel()
Initialises the KEA model. |
void |
setDisallowInternalPeriods(Boolean dissallowInternalPeriods)
|
void |
setInputAS(String inputAS)
Sets the name for the input annotation set. |
void |
setKeyphraseAnnotationType(String keyphraseAnnotationType)
Sets the annotation type to be used for keyphrases. |
void |
setMaxPhraseLength(Integer maxPhraseLength)
|
void |
setMinNumOccur(Integer minNumOccur)
|
void |
setMinPhraseLength(Integer minPhraseLength)
|
void |
setOutputAS(String outputAS)
Sets the name for the output annotation set. |
void |
setPhrasesToExtract(Integer phrasesToExtract)
|
void |
setTrainingMode(Boolean trainingMode)
|
void |
setUseKFrequency(Boolean useKFrequency)
|
Methods inherited from class gate.creole.AbstractLanguageAnalyser |
---|
getCorpus, getDocument, setCorpus, setDocument |
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, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.ProcessingResource |
---|
reInit |
Methods inherited from interface gate.Resource |
---|
cleanup, getParameterValue, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from interface gate.util.NameBearer |
---|
getName, setName |
Methods inherited from interface gate.Executable |
---|
interrupt, isInterrupted |
Field Detail |
---|
protected boolean trainingFinished
protected kea.KEAFilter keaFilter
protected weka.core.FastVector atts
protected weka.core.Instances data
protected List actions
Constructor Detail |
---|
public Kea()
Method Detail |
---|
public List getActions()
getActions
in interface ActionsPublisher
public void execute() throws ExecutionException
trainingMode
switch
it will either train a model or apply it over the documents.
execute
in interface Executable
execute
in class AbstractProcessingResource
ExecutionException
protected void annotateKeyPhrases(List phrases) throws Exception
phrases
- the list of keyphrases.
Exception
public void setKeyphraseAnnotationType(String keyphraseAnnotationType)
keyphraseAnnotationType
- public String getKeyphraseAnnotationType()
public void setInputAS(String inputAS)
inputAS
- public String getInputAS()
public void setOutputAS(String outputAS)
outputAS
- public String getOutputAS()
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class AbstractProcessingResource
ResourceInstantiationException
protected void initModel() throws Exception
Exception
protected void finishTraining() throws ExecutionException
ExecutionException
public void setMaxPhraseLength(Integer maxPhraseLength)
public Integer getMaxPhraseLength()
public void setMinPhraseLength(Integer minPhraseLength)
public Integer getMinPhraseLength()
public void setDisallowInternalPeriods(Boolean dissallowInternalPeriods)
public Boolean getDisallowInternalPeriods()
public void setUseKFrequency(Boolean useKFrequency)
public Boolean getUseKFrequency()
public void setMinNumOccur(Integer minNumOccur)
public Integer getMinNumOccur()
public Boolean getTrainingMode()
public void setTrainingMode(Boolean trainingMode)
public void setPhrasesToExtract(Integer phrasesToExtract)
public Integer getPhrasesToExtract()
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |