Revision: 19875
http://sourceforge.net/p/gate/code/19875
Author: markagreenwood
Date: 2016-12-19 18:59:01 +0000 (Mon, 19 Dec 2016)
Log Message:
-----------
converted another plugin to maven
Modified Paths:
--------------
gate/branches/sawdust2/plugins/Stemmer_Snowball/.classpath
gate/branches/sawdust2/plugins/Stemmer_Snowball/.project
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/stemmer/SnowballStemmer.java
Added Paths:
-----------
gate/branches/sawdust2/plugins/Stemmer_Snowball/pom.xml
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/org/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/stemmer/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/resources/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/resources/creole.xml
Removed Paths:
-------------
gate/branches/sawdust2/plugins/Stemmer_Snowball/build.xml
gate/branches/sawdust2/plugins/Stemmer_Snowball/creole.xml
gate/branches/sawdust2/plugins/Stemmer_Snowball/doc/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/org/
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/stemmer/
Property Changed:
----------------
gate/branches/sawdust2/plugins/Stemmer_Snowball/
Index: gate/branches/sawdust2/plugins/Stemmer_Snowball
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball 2016-12-19 18:46:15 UTC
(rev 19874)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball 2016-12-19 18:59:01 UTC
(rev 19875)
Property changes on: gate/branches/sawdust2/plugins/Stemmer_Snowball
___________________________________________________________________
Modified: svn:ignore
## -1,3 +1,2 ##
-classes
-stemmer.jar
+target
.settings
Modified: gate/branches/sawdust2/plugins/Stemmer_Snowball/.classpath
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball/.classpath 2016-12-19
18:46:15 UTC (rev 19874)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball/.classpath 2016-12-19
18:59:01 UTC (rev 19875)
@@ -1,7 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry combineaccessrules="false" exported="true" kind="src"
path="/GATE"/>
- <classpathentry kind="output" path="classes"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes"
path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: gate/branches/sawdust2/plugins/Stemmer_Snowball/.project
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball/.project 2016-12-19
18:46:15 UTC (rev 19874)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball/.project 2016-12-19
18:59:01 UTC (rev 19875)
@@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Deleted: gate/branches/sawdust2/plugins/Stemmer_Snowball/build.xml
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball/build.xml 2016-12-19
18:46:15 UTC (rev 19874)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball/build.xml 2016-12-19
18:59:01 UTC (rev 19875)
@@ -1,96 +0,0 @@
-<project name="Stemmer-plugin" default="dist" basedir=".">
- <description>
- A plugin wrapping the Snowball Stemmer
(http://snowball.tartarus.org/index.php).
- </description>
-
- <!-- Prevent Ant from warning about includeantruntime not being set -->
- <property name="build.sysclasspath" value="ignore" />
-
- <!-- set global properties for this build -->
- <property environment="env"/>
- <property file="build.properties" />
- <condition property="gate.home" value="${env.GATE_HOME}">
- <isset property="env.GATE_HOME" />
- </condition>
- <property name="src" location="src"/>
- <property name="build" location="classes"/>
- <property name="jar.location" location="stemmer.jar" />
- <property name="doc.dir" location="doc" />
- <property name="javadoc.dir" location="${doc.dir}/javadoc" />
-
- <property name="gate.home" location="../.." />
- <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
- <property name="gate.lib" location="${gate.home}/lib" />
-
- <path id="classpath">
- <pathelement location="${gate.jar}" />
- <fileset dir="${gate.lib}">
- <include name="**/*.jar" />
- <include name="**/*.zip" />
- </fileset>
- </path>
-
-
- <target name="init">
- <!-- Create the time stamp -->
- <tstamp/>
- <!-- Create the build directory structure used by compile -->
- <mkdir dir="${build}"/>
- </target>
-
- <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.5"
target="1.5">
- <classpath refid="classpath"/>
- </javac>
- </target>
-
- <!-- Build JavaDoc documentation -->
- <target name="doc.prepare">
- <mkdir dir="${javadoc.dir}" />
- </target>
-
- <target name="javadoc" depends="doc.prepare">
- <javadoc destdir="${javadoc.dir}" packagenames="*"
- classpathref="classpath"
- encoding="UTF-8"
- windowtitle="${plugin.name} JavaDoc"
- source="1.6">
- <sourcepath>
- <pathelement location="${src}" />
- </sourcepath>
- <link href="http://docs.oracle.com/javase/6/docs/api/" />
- <link href="http://gate.ac.uk/gate/doc/javadoc/" />
- </javadoc>
- </target>
-
- <target name="copy.resources" depends="init"
- description="copy non-.java files from src to build" >
- <copy todir="${build}" includeEmptyDirs="true">
- <fileset dir="${src}" excludes="**/*.java" />
- </copy>
- </target>
-
- <target name="dist" depends="compile, copy.resources"
- description="generate the distribution" >
- <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
- <jar jarfile="${jar.location}" basedir="${build}"/>
- </target>
-
- <target name="clean.classes"
- description="clean up" >
- <!-- Delete the ${build} and ${dist} directory trees -->
- <delete dir="${build}"/>
- </target>
-
- <target name="clean" depends="clean.classes" >
- <!-- full clean also removes the generated JAR file -->
- <delete file="${jar.location}" />
- </target>
-
- <!-- Targets used by the main build file -->
- <target name="build" depends="dist" />
- <target name="test" />
- <target name="distro.prepare" depends="clean.classes" />
-</project>
Deleted: gate/branches/sawdust2/plugins/Stemmer_Snowball/creole.xml
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball/creole.xml 2016-12-19
18:46:15 UTC (rev 19874)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball/creole.xml 2016-12-19
18:59:01 UTC (rev 19875)
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-
-<CREOLE-DIRECTORY>
- <!-- Processing Resources -->
- <CREOLE>
-
- <RESOURCE>
- <NAME>Stemmer PR</NAME>
- <JAR>stemmer.jar</JAR>
- <CLASS>stemmer.SnowballStemmer</CLASS>
- <COMMENT>Wrapper for the Snowball stemmer.</COMMENT>
- <HELPURL>http://gate.ac.uk/userguide/sec:parsers:stemmer</HELPURL>
- <PARAMETER
- NAME="document"
- RUNTIME="true"
- COMMENT="The document to be processed">gate.Document</PARAMETER>
- <PARAMETER
- NAME="annotationSetName"
- RUNTIME="true"
- DEFAULT=""
- OPTIONAL="true"
- COMMENT="The annotation set to be used for the generated annotations"
>java.lang.String</PARAMETER>
- <PARAMETER
- NAME="annotationType"
- RUNTIME="true"
- DEFAULT="Token"
- COMMENT="Annotation type to be processed" >java.lang.String</PARAMETER>
- <PARAMETER
- NAME="annotationFeature"
- RUNTIME="true"
- DEFAULT="string"
- COMMENT="Feature containging a string of the word to be stemmed"
>java.lang.String</PARAMETER>
- <PARAMETER
- NAME="language"
- DEFAULT="english"
- COMMENT="stemmer language" >java.lang.String</PARAMETER>
- </RESOURCE>
-
- </CREOLE>
-</CREOLE-DIRECTORY>
Added: gate/branches/sawdust2/plugins/Stemmer_Snowball/pom.xml
===================================================================
--- gate/branches/sawdust2/plugins/Stemmer_Snowball/pom.xml
(rev 0)
+++ gate/branches/sawdust2/plugins/Stemmer_Snowball/pom.xml 2016-12-19
18:59:01 UTC (rev 19875)
@@ -0,0 +1,38 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>uk.ac.gate.plugins</groupId>
+ <artifactId>base-plugin</artifactId>
+ <!-- this should be the version of GATE you wish to build
against -->
+ <version>9.0-SNAPSHOT</version>
+ <relativePath>../../Plugin_Base/pom.xml</relativePath>
+ </parent>
+
+ <!-- this is the description of this plugin -->
+ <groupId>uk.ac.gate.plugins</groupId>
+ <artifactId>stemmer-snowball</artifactId>
+ <version>9.0-SNAPSHOT</version>
+
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License (LGPL), Version
3</name>
+ <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <organization>
+ <name>GATE</name>
+ <url>http://gate.ac.uk</url>
+ </organization>
+
+ <dependencies>
+ <!-- add any other libraries your plugin depends on. Any other
GATE plugins
+ you depend on at compile time should use the provided
scope -->
+ </dependencies>
+
+</project>
Modified:
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/stemmer/SnowballStemmer.java
===================================================================
---
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/stemmer/SnowballStemmer.java
2016-12-19 18:46:15 UTC (rev 19874)
+++
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/java/stemmer/SnowballStemmer.java
2016-12-19 18:59:01 UTC (rev 19875)
@@ -4,22 +4,37 @@
*/
package stemmer;
-import gate.*;
-import gate.creole.*;
-import gate.util.*;
import java.util.Iterator;
+import gate.Annotation;
+import gate.AnnotationSet;
+import gate.FeatureMap;
+import gate.ProcessingResource;
+import gate.Resource;
+import gate.creole.AbstractLanguageAnalyser;
+import gate.creole.ExecutionException;
+import gate.creole.ExecutionInterruptedException;
+import gate.creole.ResourceInstantiationException;
+import gate.creole.metadata.CreoleParameter;
+import gate.creole.metadata.CreoleResource;
+import gate.creole.metadata.Optional;
+import gate.creole.metadata.RunTime;
+import gate.util.GateRuntimeException;
+
/**
* A simple CREOLE wrapper for the Snowball stemmer.
*/
+@CreoleResource(comment="Wrapper for the Snowball stemmer.",
helpURL="http://gate.ac.uk/userguide/sec:parsers:stemmer", name="Snowball
Stemmer")
public class SnowballStemmer extends AbstractLanguageAnalyser implements
ProcessingResource {
+ private static final long serialVersionUID = -7846910753298188733L;
+
public Resource init() throws ResourceInstantiationException{
fireStatusChanged("Creating a stemmer");
fireProgressChanged(0);
try {
- Class stemClass = Class.forName(String.valueOf(String
+ Class<?> stemClass = Class.forName(String.valueOf(String
.valueOf((new StringBuffer("org.tartarus.snowball.ext.")).append(
language).append("Stemmer"))));
stemmer = (org.tartarus.snowball.SnowballStemmer)stemClass.newInstance();
@@ -84,6 +99,7 @@
fireProcessFinished();
}
+ @CreoleParameter(comment="stemmer language",defaultValue="english")
public void setLanguage(String language) {
this.language = language;
}
@@ -92,6 +108,9 @@
return language;
}
+ @RunTime
+ @Optional
+ @CreoleParameter(comment="The annotation set to be used for the generated
annotations")
public void setAnnotationSetName(String annotationSetName) {
this.annotationSetName = annotationSetName;
}
@@ -100,6 +119,8 @@
return annotationSetName;
}
+ @RunTime
+ @CreoleParameter(comment="Annotation type to be processed",
defaultValue="Token")
public void setAnnotationType(String annotationType) {
this.annotationType = annotationType;
}
@@ -108,6 +129,8 @@
return annotationType;
}
+ @RunTime
+ @CreoleParameter(comment="Feature containging a string of the word to be
stemmed", defaultValue="string")
public void setAnnotationFeature(String annotationFeature) {
this.annotationFeature = annotationFeature;
}
Copied:
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/resources/creole.xml
(from rev 19874, gate/branches/sawdust2/plugins/Stemmer_Snowball/creole.xml)
===================================================================
---
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/resources/creole.xml
(rev 0)
+++
gate/branches/sawdust2/plugins/Stemmer_Snowball/src/main/resources/creole.xml
2016-12-19 18:59:01 UTC (rev 19875)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<CREOLE-DIRECTORY>
+
+</CREOLE-DIRECTORY>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs