@CreoleResource(name="ANNIE Sentence Splitter", comment="ANNIE sentence splitter.", helpURL="http://gate.ac.uk/userguide/sec:annie:splitter", icon="sentence-splitter") public class SentenceSplitter extends AbstractLanguageAnalyser implements Benchmarkable
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener
Modifier and Type | Field and Description |
---|---|
static String |
SPLIT_DOCUMENT_PARAMETER_NAME |
static String |
SPLIT_ENCODING_PARAMETER_NAME |
static String |
SPLIT_GAZ_URL_PARAMETER_NAME |
static String |
SPLIT_INPUT_AS_PARAMETER_NAME |
static String |
SPLIT_OUTPUT_AS_PARAMETER_NAME |
static String |
SPLIT_TRANSD_URL_PARAMETER_NAME |
corpus, document
interrupted
name
features
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DATE_POSTED_ANNOTATION_TYPE, DEFAULT_FILE, DOCUMENT_COREF_FEATURE_NAME, JOB_ID_ANNOTATION_TYPE, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_CLASS_FEATURE_NAME, LOOKUP_INSTANCE_FEATURE_NAME, LOOKUP_LANGUAGE_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, PLUGIN_DIR, 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
Constructor and Description |
---|
SentenceSplitter() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
should clear all internal data of the resource.
|
void |
execute()
Run the resource.
|
String |
getBenchmarkId()
Returns the benchmark ID of this resource.
|
String |
getEncoding() |
URL |
getGazetteerListsURL() |
String |
getInputASName() |
String |
getOutputASName() |
URL |
getTransducerURL() |
Resource |
init()
Initialise this resource, and return it.
|
void |
interrupt()
Notifies all the PRs in this controller that they should stop their
execution as soon as possible.
|
void |
setBenchmarkId(String benchmarkId)
This method sets the benchmarkID for this resource.
|
void |
setEncoding(String newEncoding) |
void |
setGazetteerListsURL(URL newGazetteerListsURL) |
void |
setInputASName(String newInputASName) |
void |
setOutputASName(String newOutputASName) |
void |
setTransducerURL(URL newTransducerURL) |
getCorpus, getDocument, setCorpus, setDocument
addProgressListener, addStatusListener, fireProcessFinished, fireProgressChanged, fireStatusChanged, getRuntimeParameterValues, getRuntimeParameterValues, isInterrupted, reInit, removeProgressListener, removeStatusListener
checkParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toString
getFeatures, setFeatures
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
reInit
getParameterValue, setParameterValue, setParameterValues
getFeatures, setFeatures
getName, setName
isInterrupted
public static final String SPLIT_DOCUMENT_PARAMETER_NAME
public static final String SPLIT_INPUT_AS_PARAMETER_NAME
public static final String SPLIT_OUTPUT_AS_PARAMETER_NAME
public static final String SPLIT_ENCODING_PARAMETER_NAME
public static final String SPLIT_GAZ_URL_PARAMETER_NAME
public static final String SPLIT_TRANSD_URL_PARAMETER_NAME
public SentenceSplitter()
public Resource init() throws ResourceInstantiationException
AbstractProcessingResource
init
in interface Resource
init
in class AbstractProcessingResource
ResourceInstantiationException
public void cleanup()
AbstractProcessingResource
cleanup
in interface Resource
cleanup
in class AbstractProcessingResource
public void execute() throws ExecutionException
AbstractProcessingResource
execute
in interface Executable
execute
in class AbstractProcessingResource
ExecutionException
public void interrupt()
interrupt
in interface Executable
interrupt
in class AbstractProcessingResource
@Optional @CreoleParameter(defaultValue="resources/sentenceSplitter/grammar/main-single-nl.jape", comment="The URL to the custom Jape grammar file", suffixes="jape") public void setTransducerURL(URL newTransducerURL)
public URL getTransducerURL()
@CreoleParameter(comment="The encoding used for reading the definition files", defaultValue="UTF-8") public void setEncoding(String newEncoding)
public String getEncoding()
@Optional @CreoleParameter(defaultValue="resources/sentenceSplitter/gazetteer/lists.def", comment="The URL to the custom list lookup definition file", suffixes="def") public void setGazetteerListsURL(URL newGazetteerListsURL)
public URL getGazetteerListsURL()
@RunTime @Optional @CreoleParameter(comment="The annotation set to be used as input that must contain \'Token\' annotations") public void setInputASName(String newInputASName)
public String getInputASName()
@RunTime @Optional @CreoleParameter(comment="The annotation set to be used as output for \'Sentence\' and \'Split\' annotations") public void setOutputASName(String newOutputASName)
public String getOutputASName()
public String getBenchmarkId()
Benchmarkable
getBenchmarkId
in interface Benchmarkable
public void setBenchmarkId(String benchmarkId)
Benchmarkable
setBenchmarkId
in interface Benchmarkable
benchmarkId
- the benchmark ID, which must not contain spaces
as it is already used as a separator in the log, you can use
Benchmark.createBenchmarkId(String, String)
for it.