Revision: 19212
http://sourceforge.net/p/gate/code/19212
Author: markagreenwood
Date: 2016-04-08 18:23:11 +0000 (Fri, 08 Apr 2016)
Log Message:
-----------
moved test code into the ANNIE plugin
Modified Paths:
--------------
gate/branches/sawdust2/plugins/ANNIE/.classpath
gate/branches/sawdust2/plugins/ANNIE/pom.xml
gate/branches/sawdust2/plugins/ANNIE/src/test/java/com/ontotext/gate/gazetteer/TestHashGazetteer.java
Added Paths:
-----------
gate/branches/sawdust2/plugins/ANNIE/src/test/
gate/branches/sawdust2/plugins/ANNIE/src/test/java/
gate/branches/sawdust2/plugins/ANNIE/src/test/java/com/
gate/branches/sawdust2/plugins/ANNIE/src/test/resources/
gate/branches/sawdust2/plugins/ANNIE/src/test/resources/tests/
gate/branches/sawdust2/plugins/ANNIE/src/test/resources/tests/doc0.html
Removed Paths:
-------------
gate/branches/sawdust2/src/test/com/
Modified: gate/branches/sawdust2/plugins/ANNIE/.classpath
===================================================================
--- gate/branches/sawdust2/plugins/ANNIE/.classpath 2016-04-08 18:22:42 UTC
(rev 19211)
+++ gate/branches/sawdust2/plugins/ANNIE/.classpath 2016-04-08 18:23:11 UTC
(rev 19212)
@@ -6,7 +6,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry combineaccessrules="false" kind="src" path="/GATE"/>
<classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Modified: gate/branches/sawdust2/plugins/ANNIE/pom.xml
===================================================================
--- gate/branches/sawdust2/plugins/ANNIE/pom.xml 2016-04-08 18:22:42 UTC
(rev 19211)
+++ gate/branches/sawdust2/plugins/ANNIE/pom.xml 2016-04-08 18:23:11 UTC
(rev 19212)
@@ -25,7 +25,7 @@
<groupId>uk.ac.gate</groupId>
<artifactId>gate-core</artifactId>
<!-- set this to the version of GATE you want to build
against -->
- <version>8.2-SNAPSHOT</version>
+ <version>9.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Modified:
gate/branches/sawdust2/plugins/ANNIE/src/test/java/com/ontotext/gate/gazetteer/TestHashGazetteer.java
===================================================================
---
gate/branches/sawdust2/src/test/com/ontotext/gate/gazetteer/TestHashGazetteer.java
2016-04-08 18:22:42 UTC (rev 19211)
+++
gate/branches/sawdust2/plugins/ANNIE/src/test/java/com/ontotext/gate/gazetteer/TestHashGazetteer.java
2016-04-08 18:23:11 UTC (rev 19212)
@@ -13,8 +13,10 @@
import gate.Factory;
import gate.FeatureMap;
import gate.Gate;
-import gate.corpora.TestDocument;
+import gate.Plugin;
+
import java.net.URL;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -32,6 +34,10 @@
/** Fixture set up */
@Override
public void setUp() throws Exception {
+ Gate.runInSandbox(true);
+ Gate.init();
+
+ Gate.getCreoleRegister().registerPlugin(new
Plugin.Maven("uk.ac.gate.plugins", "annie", "9.0-SNAPSHOT"));
}
@Override
@@ -41,9 +47,11 @@
/** Test the default tokeniser */
public void testHashGazetteer() throws Exception {
//get a document
- Document doc = Factory.newDocument(
- new URL(TestDocument.getTestServerName() + "tests/doc0.html")
- );
+ URL url = TestHashGazetteer.class.getResource("/tests/doc0.html");
+
+ System.out.println(url);
+
+ Document doc = Factory.newDocument(url);
System.out.println(doc.getFeatures().get("gate.SourceURL"));
Copied: gate/branches/sawdust2/plugins/ANNIE/src/test/resources/tests/doc0.html
(from rev 19184,
gate/branches/sawdust2/src/test/gate/resources/gate.ac.uk/tests/doc0.html)
===================================================================
--- gate/branches/sawdust2/plugins/ANNIE/src/test/resources/tests/doc0.html
(rev 0)
+++ gate/branches/sawdust2/plugins/ANNIE/src/test/resources/tests/doc0.html
2016-04-08 18:23:11 UTC (rev 19212)
@@ -0,0 +1,46 @@
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <TITLE>The original GATE test document</TITLE>
+</HEAD>
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
+<PRE>
+
+<DOC>
+<DOCID> wsj93_062.0057 </DOCID>
+<DOCNO> 930119-0125. </DOCNO>
+<HL> Diller Is Named Chairman,
+@ Chief Executive of QVC </HL>
+<DD> 01/19/93 </DD>
+<SO> WALL STREET JOURNAL (J), PAGE C25 </SO>
+<CO> QVCN </CO>
+<IN> LIMITED PRODUCT SPECIALTY RETAILERS (OTS),
+ ALL SPECIALTY RETAILERS (RTS) </IN>
+<DATELINE> WEST CHESTER, Pa. </DATELINE>
+<TXT>
+<p>
+ QVC Network Inc., as expected, named Barry
+Diller its chairman and chief executive officer.
+</p>
+<p>
+ Mr. Diller, 50 years old, succeeds Joseph M. Segel, who has been
+named to the post of chairman emeritus. Mr. Diller previously was
+chairman and chief executive of Fox Inc. and Twentieth Century Fox
+Film Corp., both units of News Corp. He also served for 10 years as
+chairman and chief executive of Paramount Pictures Corp., a unit of
+Paramount Communications Inc.
+</p>
+<p>
+ Arrow Investments Inc., a corporation controlled by Mr. Diller,
+in December agreed to purchase $25 million of QVC stock in a
+privately negotiated transaction. At that time, it was announced
+that Diller was in talks with the company on becoming its chairman
+and chief executive upon Mr. Segel's scheduled retirement this
+month.
+</p>
+</TXT>
+</DOC>
+
+</PRE>
+</BODY>
+</HTML>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs