我想使用BWP Gazetteer
而不是 GATE 的默认地名词典。为此,我将它作为资源添加到工作区中,creole.xml
并将其 JAR 包括在工作区中。
克里奥尔语.xml
<RESOURCE>
<NAME>BWPGazetteer</NAME>
<JAR>BWPGazetteer.jar</JAR>
<CLASS>bwp.gate.gazetteer.BWPGazetteer</CLASS>
<COMMENT>A BWPGazetteer.</COMMENT>
<PARAMETER NAME="document" RUNTIME="true"
COMMENT="The document to be processed"> gate.Document</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="listsURL"
DEFAULT="resources/gazetteer/lists.def"
COMMENT="The URL to the file with list of lists" SUFFIXES="def">
java.net.URL</PARAMETER>
<PARAMETER DEFAULT="UTF-8"
COMMENT="The encoding used for reading the definitions" NAME="encoding">
java.lang.String</PARAMETER>
<PARAMETER DEFAULT="true"
COMMENT="Should this gazetteer diferentiate on case"
NAME="caseSensitive">java.lang.Boolean</PARAMETER>
<PARAMETER DEFAULT="true"
COMMENT="Should this gazetteer only match whole words"
NAME="wholeWordsOnly">java.lang.Boolean</PARAMETER>
<PARAMETER NAME="normalizedDistanceThreshold"
COMMENT="Maximum normalized distance(0.0-1.0) for a match"
DEFAULT="0.1">
java.lang.Double
</PARAMETER>
<PARAMETER DEFAULT="true"
COMMENT="Should this gazetter avoid overlapping annotations"
NAME= "avoidOverlapingAnnotations">
java.lang.Boolean
</PARAMETER>
谁能告诉我需要在我的 JAVA 代码或配置文件中进行哪些进一步更改才能使用它?