Revision: 16596
http://sourceforge.net/p/gate/code/16596
Author: johann_p
Date: 2013-03-15 13:40:24 +0000 (Fri, 15 Mar 2013)
Log Message:
-----------
Upgrading to newest version 1.2 of BoilerPipe lib,
adding more features to the annotations when debug
is enabled, adding the "Artice Sentences" Extractor.
Modified Paths:
--------------
gate/trunk/plugins/Tagger_Boilerpipe/build.xml
gate/trunk/plugins/Tagger_Boilerpipe/creole.xml
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/BoilerPipe.java
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/Extractor.java
Added Paths:
-----------
gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
Removed Paths:
-------------
gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.1.0.jar
Modified: gate/trunk/plugins/Tagger_Boilerpipe/build.xml
===================================================================
--- gate/trunk/plugins/Tagger_Boilerpipe/build.xml 2013-03-15 12:25:23 UTC
(rev 16595)
+++ gate/trunk/plugins/Tagger_Boilerpipe/build.xml 2013-03-15 13:40:24 UTC
(rev 16596)
@@ -1,83 +1,83 @@
-<project name="BoilerPipe" basedir="." default="build">
- <!-- Prevent Ant from warning about includeantruntime not being set -->
- <property name="build.sysclasspath" value="ignore" />
-
- <property file="build.properties" />
-
- <property name="gate.home" location="../../" />
- <property name="gate.lib" location="${gate.home}/lib" />
- <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
- <property name="src.dir" location="src" />
- <property name="classes.dir" location="classes" />
- <property name="jar.location" location="BoilerpipeTagger.jar" />
- <property name="doc.dir" location="doc" />
- <property name="javadoc.dir" location="${doc.dir}/javadoc" />
-
- <!-- Path to compile - includes gate.jar and GATE/lib/*.jar -->
- <path id="compile.classpath">
- <fileset dir="lib">
- <include name="**/*.jar" />
- </fileset>
- <pathelement location="${gate.jar}" />
- <fileset dir="${gate.lib}">
- <include name="**/*.jar" />
- <include name="**/*.zip" />
- </fileset>
- </path>
-
- <!-- create build directory structure -->
- <target name="prepare">
- <mkdir dir="${classes.dir}" />
- </target>
-
- <target name="resources" depends="prepare">
- <copy todir="${classes.dir}/gate/resources"
includeEmptyDirs="true">
- <fileset dir="${src.dir}/gate/resources" />
- </copy>
- </target>
-
- <!-- compile the source -->
- <target name="compile" depends="prepare">
- <javac classpathref="compile.classpath" srcdir="${src.dir}"
destdir="${classes.dir}" debug="true" debuglevel="lines,source" source="1.5"
target="1.5" />
- </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="compile.classpath" encoding="UTF-8"
windowtitle="Tagger_Boilerpipe JavaDoc" source="1.6">
- <sourcepath>
- <pathelement location="${src.dir}" />
- </sourcepath>
- <link href="http://docs.oracle.com/javase/6/docs/api/"
/>
- <link href="http://gate.ac.uk/gate/doc/javadoc/" />
- </javadoc>
- </target>
-
- <!-- create the JAR file -->
- <target name="jar" depends="compile, resources">
- <jar destfile="${jar.location}" update="false"
basedir="${classes.dir}" />
- </target>
-
- <!-- remove the generated .class files -->
- <target name="clean.classes">
- <delete dir="${classes.dir}" />
- </target>
-
- <!-- Clean up - remove .class and .jar files -->
- <target name="clean" depends="clean.classes">
- <delete file="${jar.location}" />
- </target>
-
- <!-- Targets used by the main GATE build file:
- build: build the plugin - just calls "jar" target
- test : run the unit tests - there aren't any
- distro.prepare: remove intermediate files that shouldn't be in the
- distribution
- -->
- <target name="build" depends="jar" />
- <target name="test" />
- <target name="distro.prepare" depends="clean.classes" />
-</project>
+<project name="BoilerPipe" basedir="." default="build">
+ <!-- Prevent Ant from warning about includeantruntime not being set -->
+ <property name="build.sysclasspath" value="ignore" />
+
+ <property file="build.properties" />
+
+ <property name="gate.home" location="../../" />
+ <property name="gate.lib" location="${gate.home}/lib" />
+ <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
+ <property name="src.dir" location="src" />
+ <property name="classes.dir" location="classes" />
+ <property name="jar.location" location="BoilerpipeTagger.jar" />
+ <property name="doc.dir" location="doc" />
+ <property name="javadoc.dir" location="${doc.dir}/javadoc" />
+
+ <!-- Path to compile - includes gate.jar and GATE/lib/*.jar -->
+ <path id="compile.classpath">
+ <fileset dir="lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <pathelement location="${gate.jar}" />
+ <fileset dir="${gate.lib}">
+ <include name="**/*.jar" />
+ <include name="**/*.zip" />
+ </fileset>
+ </path>
+
+ <!-- create build directory structure -->
+ <target name="prepare">
+ <mkdir dir="${classes.dir}" />
+ </target>
+
+ <target name="resources" depends="prepare">
+ <copy todir="${classes.dir}/gate/resources"
includeEmptyDirs="true">
+ <fileset dir="${src.dir}/gate/resources" />
+ </copy>
+ </target>
+
+ <!-- compile the source -->
+ <target name="compile" depends="prepare">
+ <javac classpathref="compile.classpath" srcdir="${src.dir}"
destdir="${classes.dir}" debug="true" debuglevel="lines,source" source="1.5"
target="1.5" />
+ </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="compile.classpath" encoding="UTF-8"
windowtitle="Tagger_Boilerpipe JavaDoc" source="1.6">
+ <sourcepath>
+ <pathelement location="${src.dir}" />
+ </sourcepath>
+ <link href="http://docs.oracle.com/javase/6/docs/api/"
/>
+ <link href="http://gate.ac.uk/gate/doc/javadoc/" />
+ </javadoc>
+ </target>
+
+ <!-- create the JAR file -->
+ <target name="jar" depends="compile, resources">
+ <jar destfile="${jar.location}" update="false"
basedir="${classes.dir}" />
+ </target>
+
+ <!-- remove the generated .class files -->
+ <target name="clean.classes">
+ <delete dir="${classes.dir}" />
+ </target>
+
+ <!-- Clean up - remove .class and .jar files -->
+ <target name="clean" depends="clean.classes">
+ <delete file="${jar.location}" />
+ </target>
+
+ <!-- Targets used by the main GATE build file:
+ build: build the plugin - just calls "jar" target
+ test : run the unit tests - there aren't any
+ distro.prepare: remove intermediate files that shouldn't be in the
+ distribution
+ -->
+ <target name="build" depends="jar" />
+ <target name="test" />
+ <target name="distro.prepare" depends="clean.classes" />
+</project>
Modified: gate/trunk/plugins/Tagger_Boilerpipe/creole.xml
===================================================================
--- gate/trunk/plugins/Tagger_Boilerpipe/creole.xml 2013-03-15 12:25:23 UTC
(rev 16595)
+++ gate/trunk/plugins/Tagger_Boilerpipe/creole.xml 2013-03-15 13:40:24 UTC
(rev 16596)
@@ -1,6 +1,6 @@
-<?xml version="1.0"?>
-
-<CREOLE-DIRECTORY>
- <JAR SCAN="true">BoilerpipeTagger.jar</JAR>
- <JAR>lib/boilerpipe-1.1.0.jar</JAR>
-</CREOLE-DIRECTORY>
+<?xml version="1.0"?>
+
+<CREOLE-DIRECTORY>
+ <JAR SCAN="true">BoilerpipeTagger.jar</JAR>
+ <JAR>lib/boilerpipe-1.2.0.jar</JAR>
+</CREOLE-DIRECTORY>
Deleted: gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.1.0.jar
===================================================================
(Binary files differ)
Added: gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
===================================================================
--- gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
2013-03-15 12:25:23 UTC (rev 16595)
+++ gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
2013-03-15 13:40:24 UTC (rev 16596)
Property changes on:
gate/trunk/plugins/Tagger_Boilerpipe/lib/boilerpipe-1.2.0.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified:
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/BoilerPipe.java
===================================================================
---
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/BoilerPipe.java
2013-03-15 12:25:23 UTC (rev 16595)
+++
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/BoilerPipe.java
2013-03-15 13:40:24 UTC (rev 16596)
@@ -556,12 +556,16 @@
if(debug) {
// if we are in debug mode dump everything we know about this block
into
// the feature map
+ params.put("ld", block.getLinkDensity());
+ params.put("nw", block.getNumWords());
+ params.put("nwiat", block.getNumWordsInAnchorText());
+ params.put("end", block.getOffsetBlocksEnd());
+ params.put("start", block.getOffsetBlocksStart());
+ params.put("tl", block.getTagLevel());
+ params.put("td", block.getTextDensity());
params.put("content", block.isContent());
- params.put("start", block.getOffsetBlocksStart());
- params.put("end", block.getOffsetBlocksEnd());
params.put("nwiwl", block.getNumWordsInWrappedLines());
params.put("nwl", block.getNumWrappedLines());
- params.put("ld", block.getLinkDensity());
}
// now actually create and add the annotation to the annotation set
Modified:
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/Extractor.java
===================================================================
---
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/Extractor.java
2013-03-15 12:25:23 UTC (rev 16595)
+++
gate/trunk/plugins/Tagger_Boilerpipe/src/gate/creole/boilerpipe/Extractor.java
2013-03-15 13:40:24 UTC (rev 16596)
@@ -15,6 +15,7 @@
import de.l3s.boilerpipe.BoilerpipeExtractor;
import de.l3s.boilerpipe.extractors.ArticleExtractor;
+import de.l3s.boilerpipe.extractors.ArticleSentencesExtractor;
import de.l3s.boilerpipe.extractors.CanolaExtractor;
import de.l3s.boilerpipe.extractors.DefaultExtractor;
import de.l3s.boilerpipe.extractors.LargestContentExtractor;
@@ -30,6 +31,7 @@
public enum Extractor {
ARTICLE("Article", ArticleExtractor.INSTANCE),
+ ARTICLE_SENTENCES("Article Sentences", ArticleSentencesExtractor.INSTANCE),
/**
* Trained on the <a
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs