Revision: 17944
http://sourceforge.net/p/gate/code/17944
Author: ian_roberts
Date: 2014-05-10 22:11:42 +0000 (Sat, 10 May 2014)
Log Message:
-----------
Allow an arbitrary CorpusController for root finder, instead of specifically
requiring a tokeniser, POS tagger and morpher (so you can use other equivalent
PRs like OpenNLP instead).
Updated the example saved app, but this change is backwards-compatible with
exinsting saved states.
Modified Paths:
--------------
gate/trunk/plugins/Gazetteer_Ontology_Based/build.xml
gate/trunk/plugins/Gazetteer_Ontology_Based/creole.xml
gate/trunk/plugins/Gazetteer_Ontology_Based/resources/exampleApp.xgapp
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/OntoRootGaz.java
Removed Paths:
-------------
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/FakeSentenceSplitter.java
Modified: gate/trunk/plugins/Gazetteer_Ontology_Based/build.xml
===================================================================
--- gate/trunk/plugins/Gazetteer_Ontology_Based/build.xml 2014-05-10
22:09:16 UTC (rev 17943)
+++ gate/trunk/plugins/Gazetteer_Ontology_Based/build.xml 2014-05-10
22:11:42 UTC (rev 17944)
@@ -41,7 +41,7 @@
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
- <javac srcdir="${src}" destdir="${build}" debug="true" source="1.6"
target="1.6">
+ <javac srcdir="${src}" destdir="${build}" debug="true" source="1.7"
target="1.7">
<classpath refid="classpath"/>
<compilerarg value="-Xmaxwarns" />
<compilerarg value="${gate.compile.maxwarnings}" />
Modified: gate/trunk/plugins/Gazetteer_Ontology_Based/creole.xml
===================================================================
--- gate/trunk/plugins/Gazetteer_Ontology_Based/creole.xml 2014-05-10
22:09:16 UTC (rev 17943)
+++ gate/trunk/plugins/Gazetteer_Ontology_Based/creole.xml 2014-05-10
22:11:42 UTC (rev 17944)
@@ -1,136 +1,6 @@
<?xml version="1.0"?>
<!-- creole.xml for Ontology_Based_Gazetteer plugin -->
<CREOLE-DIRECTORY>
- <CREOLE>
- <JAR>obg.jar</JAR>
+ <JAR SCAN="true">obg.jar</JAR>
<JAR>lib/oro-2.0.8.jar</JAR>
- <!-- creole.xml for Onto Root gazetteer -->
- <RESOURCE>
- <NAME>Onto Root Gazetteer</NAME>
- <CLASS>gate.clone.ql.OntoRootGaz</CLASS>
- <COMMENT>
- A ontology lookup component
- </COMMENT>
- <HELPURL>http://gate.ac.uk/userguide/sec:gazetteers:ontoRootGaz</HELPURL>
- <PARAMETER NAME="ontology"
- COMMENT="The Ontology to be used"
- >gate.creole.ontology.Ontology
- </PARAMETER>
- <PARAMETER NAME="tokeniser"
- COMMENT="The internal tokeniser">
- gate.creole.tokeniser.DefaultTokeniser
- </PARAMETER>
- <PARAMETER NAME="posTagger"
- COMMENT="The internal POS Tagger">
- gate.creole.POSTagger
- </PARAMETER>
- <PARAMETER NAME="morpher"
- COMMENT="The internal Morphological Analyser">
- gate.creole.morph.Morph
- </PARAMETER>
- <PARAMETER NAME="document" RUNTIME="true"
- COMMENT="The document to be processed">
- gate.Document
- </PARAMETER>
- <PARAMETER NAME="separateCamelCasedWords"
- DEFAULT="true"
- COMMENT="Should this gazetteer separate camelCased words, e.g.
ProjectName into Project Name">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="considerHeuristicRules"
- DEFAULT="false"
- COMMENT="Should this gazetteer consider several heuristic rules or not:
- the words containing spaces will be split; for example, if
- 'pos tagger for spanish' would be analysed, 'for' would be consider as a
stop
- word; heuristically derived would be
- 'pos tagger' and this would be further used to add 'pos tagger' with
- heuristical level 0, and 'tagger' with hl 1 to the gazetteer list;
- at runtime lower heuristical level should be prefered">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="useResourceUri"
- DEFAULT="true"
- COMMENT="Should this gazetteer use resource URIs or not">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="considerProperties"
- DEFAULT="true"
- COMMENT="Should this gazetteer consider properties or not">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="propertiesToInclude" OPTIONAL="true"
- DEFAULT=""
- COMMENT="The list of property names to be included, comma separated">
- java.lang.String
- </PARAMETER>
- <PARAMETER NAME="propertiesToExclude" OPTIONAL="true"
- DEFAULT=""
- COMMENT="The list of property names to be excluded, comma separated">
- java.lang.String
- </PARAMETER>
- <PARAMETER NAME="typesToConsider" OPTIONAL="true"
- DEFAULT="class;instance;property"
- COMMENT="The list of types to be included. Possible values: instance,
class, property">
- java.util.Set
- </PARAMETER>
- <PARAMETER NAME="caseSensitive"
- DEFAULT="false"
- COMMENT="Should this gazetteer diferentiate on case">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="annotationSetName" RUNTIME="true"
- COMMENT="The annotation set to be used for the generated annotations"
- OPTIONAL="true">
- java.lang.String
- </PARAMETER>
- <PARAMETER NAME="wholeWordsOnly"
- DEFAULT="true"
- COMMENT="Should this gazetteer only match whole words"
- RUNTIME="true">
- java.lang.Boolean
- </PARAMETER>
- <PARAMETER NAME="longestMatchOnly"
- DEFAULT="true"
- COMMENT="Should this gazetteer only match the longest string starting
from any offset?"
- RUNTIME="true">
- java.lang.Boolean
- </PARAMETER>
- <ICON>gazetteer</ICON>
- </RESOURCE>
- </CREOLE>
-
- <!-- creole.xml for Fake Sentence Splitter-->
- <RESOURCE>
- <NAME>Fake Sentence Splitter</NAME>
- <COMMENT>
- Fake Sentence Splitter is used by Onto Root Gazetteer
internally as it
- creates 'fake' annotation type 'Sentence' without analysing the text by
- a proper Sentence Splitter. The reason for doing this is enabling the
- POS Tagger to work properly, as the input text is usually not a proper
- sentence (i.e. ontology resource name or label). 'Faking' sentence
splitting
- optimises the processing as Onto Root Gazetteer usually does not process
- internally any multisentence text.
- </COMMENT>
- <CLASS>gate.clone.ql.FakeSentenceSplitter</CLASS>
- <PARAMETER COMMENT="The document to be processed"
- NAME="document" RUNTIME="true">
- gate.Document
- </PARAMETER>
- <PARAMETER NAME="inputASName"
- COMMENT="The name used for the temporary annotation set"
- RUNTIME="true" OPTIONAL="true">
- java.lang.String
- </PARAMETER>
- <PARAMETER NAME="outputASName"
- COMMENT="The name used for the temporary annotation set"
- RUNTIME="true" OPTIONAL="true">
- java.lang.String
- </PARAMETER>
- <PARAMETER NAME="encoding"
- COMMENT="The encoding used for reading the definition files"
- DEFAULT="UTF-8">
- java.lang.String
- </PARAMETER>
- <ICON>sentence-splitter</ICON>
- </RESOURCE>
</CREOLE-DIRECTORY>
Modified: gate/trunk/plugins/Gazetteer_Ontology_Based/resources/exampleApp.xgapp
===================================================================
--- gate/trunk/plugins/Gazetteer_Ontology_Based/resources/exampleApp.xgapp
2014-05-10 22:09:16 UTC (rev 17943)
+++ gate/trunk/plugins/Gazetteer_Ontology_Based/resources/exampleApp.xgapp
2014-05-10 22:11:42 UTC (rev 17944)
@@ -2,19 +2,19 @@
<urlList class="gate.util.persistence.CollectionPersistence">
<localList>
<gate.util.persistence.PersistenceManager-URLHolder>
- <urlString>$relpath$../../Tools</urlString>
+ <urlString>$relpath$../../Tools/</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
<gate.util.persistence.PersistenceManager-URLHolder>
- <urlString>$relpath$../../ANNIE</urlString>
+ <urlString>$relpath$../../ANNIE/</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
<gate.util.persistence.PersistenceManager-URLHolder>
- <urlString>$relpath$../../Ontology_Tools</urlString>
+ <urlString>$relpath$../../Ontology_Tools/</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
<gate.util.persistence.PersistenceManager-URLHolder>
- <urlString>$relpath$../../Ontology</urlString>
+ <urlString>$relpath$../../Ontology/</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
<gate.util.persistence.PersistenceManager-URLHolder>
- <urlString>$relpath$../../Gazetteer_Ontology_Based</urlString>
+ <urlString>$relpath$../</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
</localList>
<collectionType>java.util.ArrayList</collectionType>
@@ -197,18 +197,33 @@
<mapType>gate.util.SimpleFeatureMapImpl</mapType>
<localMap>
<entry>
- <string>tokeniser</string>
- <gate.util.persistence.LanguageAnalyserPersistence
reference="../../../../../../../../../gate.util.persistence.LanguageAnalyserPersistence"/>
+ <string>rootFinderApplication</string>
+
<gate.util.persistence.SerialAnalyserControllerPersistence>
+ <prList
class="gate.util.persistence.CollectionPersistence">
+ <localList>
+
<gate.util.persistence.LanguageAnalyserPersistence
reference="../../../../../../../../../../../../gate.util.persistence.LanguageAnalyserPersistence"/>
+
<gate.util.persistence.LanguageAnalyserPersistence
reference="../../../../../../../../../../../../gate.util.persistence.LanguageAnalyserPersistence[3]"/>
+ <gate.util.persistence.PRPersistence
reference="../../../../../../../../../../../../gate.util.persistence.PRPersistence[2]"/>
+ </localList>
+
<collectionType>java.util.ArrayList</collectionType>
+ </prList>
+
<resourceType>gate.creole.SerialAnalyserController</resourceType>
+ <resourceName>Root finder application for
OntoRootGazetteer</resourceName>
+ <initParams
class="gate.util.persistence.MapPersistence">
+ <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+ <localMap/>
+ </initParams>
+ <features
class="gate.util.persistence.MapPersistence">
+ <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+ <localMap/>
+ </features>
+
</gate.util.persistence.SerialAnalyserControllerPersistence>
</entry>
<entry>
<string>caseSensitive</string>
<boolean>false</boolean>
</entry>
<entry>
- <string>morpher</string>
- <gate.util.persistence.PRPersistence
reference="../../../../../../../../../gate.util.persistence.PRPersistence[2]"/>
- </entry>
- <entry>
<string>ontology</string>
<gate.util.persistence.LRPersistence>
<resourceType>gate.creole.ontology.owlim.OWLIMOntologyLR</resourceType>
@@ -231,10 +246,6 @@
</gate.util.persistence.LRPersistence>
</entry>
<entry>
- <string>posTagger</string>
- <gate.util.persistence.LanguageAnalyserPersistence
reference="../../../../../../../../../gate.util.persistence.LanguageAnalyserPersistence[3]"/>
- </entry>
- <entry>
<string>useResourceUri</string>
<boolean>true</boolean>
</entry>
Deleted:
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/FakeSentenceSplitter.java
===================================================================
---
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/FakeSentenceSplitter.java
2014-05-10 22:09:16 UTC (rev 17943)
+++
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/FakeSentenceSplitter.java
2014-05-10 22:11:42 UTC (rev 17944)
@@ -1,124 +0,0 @@
-/*
- * FakeSentenceSplitter.java
- *
- * Copyright (c) 1995-2012, The University of Sheffield. See the file
- * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
- *
- * This file is part of GATE (see http://gate.ac.uk/), and is free
- * software, licenced under the GNU Library General Public License,
- * Version 2, June 1991 (in the distribution as file licence.html,
- * and also available at http://gate.ac.uk/gate/licence.html).
- */
-package gate.clone.ql;
-
-import gate.AnnotationSet;
-import gate.Factory;
-import gate.Resource;
-import gate.creole.AbstractLanguageAnalyser;
-import gate.creole.ExecutionException;
-import gate.creole.ResourceInstantiationException;
-import gate.util.GateRuntimeException;
-import gate.util.InvalidOffsetException;
-
-/**
- * This class serves to simulate running of default SentenceSplitter: it will
- * always create one sentence out of any document. It is created so that in
- * cases when processing one sentence always, we don't need to run regular
- * Sentence Splitter, in order to run a POS Tagger.
- *
- * @author Danica Damljanovic
- *
- */
-public class FakeSentenceSplitter extends AbstractLanguageAnalyser {
-
- private static final long serialVersionUID = 9202556754479248757L;
-
- public static final String SPLIT_DOCUMENT_PARAMETER_NAME = "document";
-
- public static final String SPLIT_INPUT_AS_PARAMETER_NAME = "inputASName";
-
- public static final String SPLIT_OUTPUT_AS_PARAMETER_NAME = "outputASName";
-
- public static final String SPLIT_ENCODING_PARAMETER_NAME = "encoding";
-
- public static final String SPLIT_GAZ_URL_PARAMETER_NAME =
"gazetteerListsURL";
-
- public static final String SPLIT_TRANSD_URL_PARAMETER_NAME = "transducerURL";
-
- public Resource init() throws ResourceInstantiationException {
- return this;
- }
-
- public void execute() throws ExecutionException {
- interrupted = false;
- // set the runtime parameters
- if(inputASName != null && inputASName.equals("")) inputASName = null;
- if(outputASName != null && outputASName.equals("")) outputASName = null;
-
- // get pointers to the annotation sets
- AnnotationSet inputAS =
- (inputASName == null) ? document.getAnnotations() : document
- .getAnnotations(inputASName);
-
- AnnotationSet outputAS =
- (outputASName == null) ? document.getAnnotations() : document
- .getAnnotations(outputASName);
-
- // copy the results to the output set if they are different
- if(inputAS != outputAS) {
- outputAS.addAll(inputAS.get(SENTENCE_ANNOTATION_TYPE));
- }
-
- // create one big sentence if none were found
- AnnotationSet sentences = outputAS.get(SENTENCE_ANNOTATION_TYPE);
- if(sentences == null || sentences.isEmpty()) {
- // create an annotation covering the entire content
- try {
- outputAS.add(new Long(0), document.getContent().size(),
- SENTENCE_ANNOTATION_TYPE, Factory.newFeatureMap());
- }
- catch(InvalidOffsetException ioe) {
- throw new GateRuntimeException(ioe);
- }
- }
- }// execute()
-
- /**
- * Notifies all the PRs in this controller that they should stop their
- * execution as soon as possible.
- */
- public synchronized void interrupt() {
- interrupted = true;
- }
-
- private String encoding;
-
- public void setEncoding(String newEncoding) {
- encoding = newEncoding;
- }
-
- public String getEncoding() {
- return encoding;
- }
-
- public void setInputASName(String newInputASName) {
- inputASName = newInputASName;
- }
-
- public String getInputASName() {
- return inputASName;
- }
-
- public void setOutputASName(String newOutputASName) {
- outputASName = newOutputASName;
- }
-
- public String getOutputASName() {
- return outputASName;
- }
-
- private String inputASName;
-
- private String outputASName;
-
-}
Modified:
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/OntoRootGaz.java
===================================================================
---
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/OntoRootGaz.java
2014-05-10 22:09:16 UTC (rev 17943)
+++
gate/trunk/plugins/Gazetteer_Ontology_Based/src/gate/clone/ql/OntoRootGaz.java
2014-05-10 22:11:42 UTC (rev 17944)
@@ -12,11 +12,13 @@
import gate.Annotation;
import gate.Corpus;
+import gate.CorpusController;
import gate.Document;
import gate.Factory;
import gate.FeatureMap;
import gate.Gate;
import gate.Resource;
+import gate.Utils;
import gate.clone.ql.regex.ExpressionFinder;
import gate.creole.ANNIEConstants;
import gate.creole.ExecutionException;
@@ -27,12 +29,19 @@
import gate.creole.gazetteer.FSMState;
import gate.creole.gazetteer.LinearDefinition;
import gate.creole.gazetteer.Lookup;
+import gate.creole.metadata.CreoleParameter;
+import gate.creole.metadata.CreoleResource;
+import gate.creole.metadata.HiddenCreoleParameter;
+import gate.creole.metadata.Optional;
+import gate.creole.metadata.RunTime;
import gate.creole.morph.Morph;
import gate.creole.ontology.InvalidURIException;
import gate.creole.ontology.Ontology;
import gate.creole.tokeniser.DefaultTokeniser;
+import gate.util.InvalidOffsetException;
import gate.util.OffsetComparator;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -48,18 +57,23 @@
/**
* @author Danica Damljanovic
*/
+@CreoleResource(name = "Onto Root Gazetteer",
+ comment = "An ontology lookup component",
+ helpURL = "http://gate.ac.uk/userguide/sec:gazetteers:ontoRootGaz",
+ icon = "gazetteer")
public class OntoRootGaz extends DefaultGazetteer {
private static final long serialVersionUID = 0L;
+ @Deprecated
protected POSTagger posTagger;
+ @Deprecated
protected DefaultTokeniser tokeniser;
- protected FakeSentenceSplitter sentenceSplitter;
-
+ @Deprecated
protected Morph morpher;
- protected SerialAnalyserController rootFinderApplication;
+ protected CorpusController rootFinderApplication;
protected OffsetComparator offsetComparator;
@@ -132,6 +146,10 @@
return typesToConsider;
}
+ @RunTime
+ @CreoleParameter(defaultValue = "class;instance;property",
+ comment = "The list of types to be included. Possible values: "
+ + "instance, class, property")
public void setTypesToConsider(Set<String> typesToConsider) {
this.typesToConsider = typesToConsider;
}
@@ -160,19 +178,21 @@
long startedInit = System.currentTimeMillis();
List<String> propertiesToIncludeList = new ArrayList<String>();
List<String> propertiesToExcludeList = new ArrayList<String>();
- if(tokeniser == null)
- throw new ResourceInstantiationException("No tokeniser provided!");
- if(sentenceSplitter == null) {
- sentenceSplitter =
- (FakeSentenceSplitter)Factory
- .createResource("gate.clone.ql.FakeSentenceSplitter");
+ if(rootFinderApplication == null) {
+ if(tokeniser != null && posTagger != null & morpher != null) {
+ logger.warn("No rootFinderApplication provided, but found old-style "
+ + "separate parameters for tokeniser, POS tagger and morpher. "
+ + "Constructing an application from these.");
+ rootFinderApplication =
+ (CorpusController)Factory.createResource(
+ "gate.creole.SerialAnalyserController",
+ Factory.newFeatureMap(), Factory.newFeatureMap(),
+ "Root finder application for " + getName());
+ ((SerialAnalyserController)rootFinderApplication).add(tokeniser);
+ ((SerialAnalyserController)rootFinderApplication).add(posTagger);
+ ((SerialAnalyserController)rootFinderApplication).add(morpher);
+ }
}
- if(posTagger == null)
- throw new ResourceInstantiationException(
- "No Part-of-speach Tagger provided!");
- if(morpher == null)
- throw new ResourceInstantiationException(
- "No Morphological Analyzer provided!");
if(ontology == null) {
throw new ResourceInstantiationException("No ontology provided!");
} else {
@@ -191,17 +211,6 @@
}
fsmStates = new HashSet<FSMState>();
initialState = new FSMState(this);
- /* set the hidden feature to true */
- FeatureMap features = Factory.newFeatureMap();
- FeatureMap parameters = Factory.newFeatureMap();
- Gate.setHiddenAttribute(features, true);
- rootFinderApplication =
- (SerialAnalyserController)Factory.createResource(
- "gate.creole.SerialAnalyserController", parameters, features);
- rootFinderApplication.add(tokeniser);
- rootFinderApplication.add(sentenceSplitter);
- rootFinderApplication.add(posTagger);
- rootFinderApplication.add(morpher);
/* create a corpus and hide it inside the GATE GUI */
FeatureMap corpusParams = Factory.newFeatureMap();
corpusParams.put("name", this.getClass().getCanonicalName());
@@ -210,7 +219,6 @@
applicationCorpus =
(Corpus)Factory.createResource("gate.corpora.CorpusImpl", corpusParams,
corpusFeatures);
- rootFinderApplication.setCorpus(applicationCorpus);
offsetComparator = new OffsetComparator();
/*
* move properties to include and exclude from the list of CSV to the
actual
@@ -517,14 +525,6 @@
/* release GATE resources */
Factory.deleteResource(applicationCorpus);
applicationCorpus = null;
- rootFinderApplication.remove(morpher);
- rootFinderApplication.remove(posTagger);
- rootFinderApplication.remove(sentenceSplitter);
- Factory.deleteResource(sentenceSplitter);
- sentenceSplitter = null;
- rootFinderApplication.remove(tokeniser);
- Factory.deleteResource(rootFinderApplication);
- rootFinderApplication = null;
long currentTime = System.currentTimeMillis();
logger.info("OntoRootGaz initialized for:" + (currentTime - startedInit)
+ " ms");
@@ -660,9 +660,21 @@
aDocument =
(Document)Factory.createResource("gate.corpora.DocumentImpl",
docParams, docFeatures);
+ // add spanning Sentence annotation
+ aDocument.getAnnotations().add(Utils.start(aDocument),
+ Utils.end(aDocument), SENTENCE_ANNOTATION_TYPE,
+ Factory.newFeatureMap());
applicationCorpus.add(aDocument);
- rootFinderApplication.execute();
- } catch(ExecutionException ee) {
+ // be nice - save the old corpus parameter from the RFA and restore
+ // it after running
+ Corpus rootFinderCorpus = rootFinderApplication.getCorpus();
+ try {
+ rootFinderApplication.setCorpus(applicationCorpus);
+ rootFinderApplication.execute();
+ } finally {
+ rootFinderApplication.setCorpus(rootFinderCorpus);
+ }
+ } catch(ExecutionException | InvalidOffsetException ee) {
throw new ResourceInstantiationException(ee);
}
Iterator<Document> it = applicationCorpus.iterator();
@@ -721,34 +733,41 @@
return lookupsToBeReturned;
}
- public Morph getMorpher() {
- return morpher;
- }
-
+ @Deprecated
public void setMorpher(Morph morpher) {
this.morpher = morpher;
}
- public POSTagger getPosTagger() {
- return posTagger;
- }
-
+ @Deprecated
public void setPosTagger(POSTagger posTagger) {
this.posTagger = posTagger;
}
- public DefaultTokeniser getTokeniser() {
- return tokeniser;
- }
-
+ @Deprecated
public void setTokeniser(DefaultTokeniser tokeniser) {
this.tokeniser = tokeniser;
}
+ public CorpusController getRootFinderApplication() {
+ return rootFinderApplication;
+ }
+
+ @CreoleParameter(comment = "Application to find the roots that go into the "
+ + "gazetteer. Executed over a document containing a single "
+ + SENTENCE_ANNOTATION_TYPE + " annotation spanning the whole document, "
+ + "this application should produce Token annotations with category (POS "
+ + "tag) and root (morphological root) features. Typically that means a "
+ + "tokeniser, POS tagger and morphological analyser, but any "
+ + "application producing the correct features will work")
+ public void setRootFinderApplication(CorpusController rootFinderApplication)
{
+ this.rootFinderApplication = rootFinderApplication;
+ }
+
public Ontology getOntology() {
return ontology;
}
+ @CreoleParameter(comment = "The ontology to be used")
public void setOntology(Ontology ontology) {
this.ontology = ontology;
}
@@ -757,6 +776,8 @@
return considerProperties;
}
+ @CreoleParameter(comment = "Should this gazetteer consider properties or
not",
+ defaultValue = "true")
public void setConsiderProperties(Boolean considerProperties) {
this.considerProperties = considerProperties;
}
@@ -765,6 +786,8 @@
return useResourceUri;
}
+ @CreoleParameter(comment = "Should this gazetteer use resource URIs or not",
+ defaultValue = "true")
public void setUseResourceUri(Boolean useResourceUri) {
this.useResourceUri = useResourceUri;
}
@@ -780,6 +803,8 @@
* @param separateCamelCasedWords
* the separateCamelCasedWords to set
*/
+ @CreoleParameter(comment = "Should this gazetteer separate camelCased "
+ + "words, e.g. ProjectName into Project Name", defaultValue = "true")
public void setSeparateCamelCasedWords(Boolean separateCamelCasedWords) {
this.separateCamelCasedWords = separateCamelCasedWords;
}
@@ -795,6 +820,9 @@
* @param propertiesToExclude
* the propertiesToExclude to set
*/
+ @Optional
+ @CreoleParameter(comment = "The list of property names to be excluded, "
+ + "comma separated", defaultValue = "")
public void setPropertiesToExclude(String propertiesToExclude) {
this.propertiesToExclude = propertiesToExclude;
}
@@ -810,6 +838,9 @@
* @param propertiesToInclude
* the propertiesToInclude to set
*/
+ @Optional
+ @CreoleParameter(comment = "The list of property names to be included, "
+ + "comma separated", defaultValue = "")
public void setPropertiesToInclude(String propertiesToInclude) {
this.propertiesToInclude = propertiesToInclude;
}
@@ -824,6 +855,14 @@
/**
* @param considerHeuristicRules
*/
+ @CreoleParameter(comment = "Should this gazetteer consider several "
+ + "heuristic rules or not: the words containing spaces will be split; "
+ + "for example, if 'pos tagger for spanish' would be analysed, 'for' "
+ + "would be consider as a stop word; heuristically derived would be "
+ + "'pos tagger' and this would be further used to add 'pos tagger' with "
+ + "heuristical level 0, and 'tagger' with hl 1 to the gazetteer list; "
+ + "at runtime lower heuristical level should be prefered",
+ defaultValue = "false")
public void setConsiderHeuristicRules(Boolean considerHeuristicRules) {
this.considerHeuristicRules = considerHeuristicRules;
}
@@ -838,4 +877,20 @@
public LinearDefinition getLinearDefinition() {
return new LinearDefinition();
}
+
+ // hidden parameters
+ @HiddenCreoleParameter
+ public void setListsURL(URL u) {
+ super.setListsURL(u);
+ }
+
+ @HiddenCreoleParameter
+ public void setGazetteerFeatureSeparator(String sep) {
+ super.setGazetteerFeatureSeparator(sep);
+ }
+
+ @HiddenCreoleParameter
+ public void setEncoding(String encoding) {
+ super.setEncoding(encoding);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs