|
||||||||||
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.morph.Morph
@CreoleResource(name="GATE Morphological analyser", helpURL="http://gate.ac.uk/userguide/sec:parsers:morpher", comment="Morphological Analyzer for the English Language") public class Morph
Description: This class is a wrapper for Interpret
,
the Morphological Analyzer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class gate.creole.AbstractProcessingResource |
---|
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener |
Field Summary | |
---|---|
protected String |
affixFeatureName
Feature Name that should be displayed for the affix |
protected String |
annotationSetName
The name of the annotation set used for input |
protected Boolean |
caseSensitive
Boolean value that tells if parser should behave in caseSensitive mode |
protected Boolean |
considerPOSTag
|
protected Interpret |
existingInterpret
If this Morph PR is a duplicate of an existing PR, this property will hold a reference to the original PR's Interpret instance. |
protected Boolean |
failOnMissingInputAnnotations
|
protected Interpret |
interpret
Instance of BaseWord class - English Morpher |
protected org.apache.log4j.Logger |
logger
|
protected String |
rootFeatureName
Feature Name that should be displayed for the root word |
protected URL |
rulesFile
File which contains rules to be processed |
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 | |
---|---|
Morph()
Default Constructor |
Method Summary | |
---|---|
Resource |
duplicate(Factory.DuplicationContext ctx)
Duplicate this morpher, sharing the compiled regular expression patterns and finite state machine with the duplicate. |
void |
execute()
Method is executed after the init() method has finished its execution. |
String |
findAffix(String word,
String cat)
This method should only be called after init() |
String |
findBaseWord(String word,
String cat)
This method should only be called after init() |
String |
getAffixFeatureName()
Returns the feature name that has been currently set to display the affix word |
String |
getAnnotationSetName()
Returns the name of the AnnotationSet that has been provided to create the AnnotationSet |
Boolean |
getCaseSensitive()
A method which returns if the parser is in caseSenstive mode |
Boolean |
getConsiderPOSTag()
|
Boolean |
getFailOnMissingInputAnnotations()
|
String |
getRootFeatureName()
Returns the feature name that has been currently set to display the root word |
URL |
getRulesFile()
Returns the document under process |
Resource |
init()
This method creates the instance of the BaseWord - English Morpher and returns the instance of current class with different attributes and the instance of BaseWord class wrapped into it. |
void |
setAffixFeatureName(String affixFeatureName)
Sets the feature name that should be displayed for the affix |
void |
setAnnotationSetName(String annotationSetName)
Sets the AnnonationSet name, that is used to create the AnnotationSet |
void |
setCaseSensitive(Boolean value)
Sets the caseSensitive value, that is used to tell parser if it should convert document to lowercase before parsing |
void |
setConsiderPOSTag(Boolean value)
|
void |
setExistingInterpret(Interpret existingInterpret)
Only for use by the duplication mechanism. |
void |
setFailOnMissingInputAnnotations(Boolean fail)
|
void |
setRootFeatureName(String rootFeatureName)
Sets the feature name that should be displayed for the root word |
void |
setRulesFile(URL rulesFile)
Sets the rule file to be processed |
Methods inherited from class gate.creole.AbstractLanguageAnalyser |
---|
getCorpus, getDocument, setCorpus, setDocument |
Methods inherited from class gate.creole.AbstractProcessingResource |
---|
addProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, getRuntimeParameterValues, getRuntimeParameterValues, interrupt, isInterrupted, reInit, removeProgressListener, removeStatusListener |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, 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 URL rulesFile
protected Interpret interpret
protected String rootFeatureName
protected String affixFeatureName
protected String annotationSetName
protected Boolean caseSensitive
protected Boolean considerPOSTag
protected Interpret existingInterpret
protected Boolean failOnMissingInputAnnotations
protected org.apache.log4j.Logger logger
Constructor Detail |
---|
public Morph()
Method Detail |
---|
@RunTime @Optional @CreoleParameter(comment="Throw and exception when there are none of the required input annotations", defaultValue="true") public void setFailOnMissingInputAnnotations(Boolean fail)
public Boolean getFailOnMissingInputAnnotations()
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class AbstractProcessingResource
ResourceInstantiationException
public void execute() throws ExecutionException
execute
in interface Executable
execute
in class AbstractProcessingResource
ExecutionException
public String findBaseWord(String word, String cat)
word
-
public String findAffix(String word, String cat)
word
-
public void setRulesFile(URL rulesFile)
rulesFile
- - rule File name to be processedpublic URL getRulesFile()
public String getRootFeatureName()
public void setRootFeatureName(String rootFeatureName)
rootFeatureName
- public String getAffixFeatureName()
public void setAffixFeatureName(String affixFeatureName)
affixFeatureName
- public String getAnnotationSetName()
public void setAnnotationSetName(String annotationSetName)
annotationSetName
- public Boolean getCaseSensitive()
Boolean
value.public void setCaseSensitive(Boolean value)
public Boolean getConsiderPOSTag()
public void setConsiderPOSTag(Boolean value)
public void setExistingInterpret(Interpret existingInterpret)
public Resource duplicate(Factory.DuplicationContext ctx) throws ResourceInstantiationException
duplicate
in interface CustomDuplication
ctx
- the current duplication context
.
If an implementation of this method needs to duplicate any
other resources as part of the custom duplication process
it should pass this context back to the two-argument form of
Factory.duplicate
rather than using the single-argument form.
ResourceInstantiationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |