Revision: 17067
          http://sourceforge.net/p/gate/code/17067
Author:   markagreenwood
Date:     2013-11-08 13:02:21 +0000 (Fri, 08 Nov 2013)
Log Message:
-----------
a lunch time of cutting up wood means the core tests now all pass and all the 
plugins compile against the core, whoooooo\!

Modified Paths:
--------------
    
gate/branches/sawdust/plugins/Machine_Learning/src/gate/creole/ml/maxent/TestMaxentWrapper.java
    gate/branches/sawdust/src/test/gate/corpora/TestDocument.java
    gate/branches/sawdust/src/test/gate/creole/annic/test/TestAnnic.java
    
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/jape/jape-test.xgapp

Added Paths:
-----------
    gate/branches/sawdust/plugins/Machine_Learning/tests/
    
gate/branches/sawdust/plugins/Machine_Learning/tests/TestMaxentConfigFile.xml
    gate/branches/sawdust/plugins/Machine_Learning/tests/doc0.html
    gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html

Removed Paths:
-------------
    
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/TestMaxentConfigFile.xml
    gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html

Modified: 
gate/branches/sawdust/plugins/Machine_Learning/src/gate/creole/ml/maxent/TestMaxentWrapper.java
===================================================================
--- 
gate/branches/sawdust/plugins/Machine_Learning/src/gate/creole/ml/maxent/TestMaxentWrapper.java
     2013-11-08 10:38:28 UTC (rev 17066)
+++ 
gate/branches/sawdust/plugins/Machine_Learning/src/gate/creole/ml/maxent/TestMaxentWrapper.java
     2013-11-08 13:02:21 UTC (rev 17067)
@@ -85,8 +85,9 @@
     //get a document - take it from the gate server.
     // tests/doc0.html is a simple html document.
     Document doc = Factory.newDocument(
-      new URL(TestDocument.getTestServerName() + "tests/doc0.html")
-    );
+      //new URL(TestDocument.getTestServerName() + "tests/doc0.html"));
+        (new File("tests/doc0.html")).toURI().toURL());
+    
 
     // Get a tokeniser - just use all the default settings.
     LanguageAnalyser tokeniser=
@@ -101,8 +102,8 @@
     // Create the Maxent ML Processing resource.
     // First set up the parameters
     FeatureMap maxentParameters = Factory.newFeatureMap();
-    maxentParameters.put("configFileURL", Files.getGateResource( 
-                                 
"/gate.ac.uk/tests/TestMaxentConfigFile.xml"));
+    maxentParameters.put("configFileURL", (new 
File("tests/TestMaxentConfigFile.xml")).toURI().toURL());
+        //Files.getGateResource("/gate.ac.uk/tests/TestMaxentConfigFile.xml"));
     // Then actually make the PR
     LanguageAnalyser maxentPR =
         (LanguageAnalyser)

Added: 
gate/branches/sawdust/plugins/Machine_Learning/tests/TestMaxentConfigFile.xml
===================================================================
--- 
gate/branches/sawdust/plugins/Machine_Learning/tests/TestMaxentConfigFile.xml   
                            (rev 0)
+++ 
gate/branches/sawdust/plugins/Machine_Learning/tests/TestMaxentConfigFile.xml   
    2013-11-08 13:02:21 UTC (rev 17067)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>  
+<ML-CONFIG>  
+  <DATASET>  
+  <!-- The type of annotation used as instance -->  
+  <INSTANCE-TYPE>Token</INSTANCE-TYPE>  
+
+  <!-- Both attributes are the same, so the learning is very easy - just learn 
that LOOKUPS should be LOOKUPS! -->
+  <ATTRIBUTE>  
+    <!-- The name given to the attribute -->  
+    <NAME>Lookup(0)</NAME>  
+    <!-- The type of annotation used as attribute -->  
+    <TYPE>Lookup</TYPE>  
+    <!-- N.B. no feature type because we just want to know if the attribute is 
present or not -->      
+    <!-- The position relative to the instance annotation -->  
+    <POSITION>0</POSITION>  
+  </ATTRIBUTE>  
+ 
+  <ATTRIBUTE>  
+    <CLASS/>
+    <!-- The name given to the attribute -->  
+    <NAME>Lookup(0)</NAME>  
+    <!-- The type of annotation used as attribute -->  
+    <TYPE>Lookup</TYPE>  
+    <!-- N.B. no feature type because we just want to know if the attribute is 
present or not -->      
+    <!-- The position relative to the instance annotation -->  
+    <POSITION>0</POSITION>  
+  </ATTRIBUTE>  
+  </DATASET>
+ 
+  <ENGINE>  
+    <WRAPPER>gate.creole.ml.maxent.MaxentWrapper</WRAPPER>  
+    <OPTIONS>  
+     <CUT-OFF>1</CUT-OFF>
+     <CONFIDENCE-THRESHOLD>0.2</CONFIDENCE-THRESHOLD>  
+     <ITERATIONS>5</ITERATIONS>
+    </OPTIONS>  
+  </ENGINE>  
+</ML-CONFIG>
\ No newline at end of file


Property changes on: 
gate/branches/sawdust/plugins/Machine_Learning/tests/TestMaxentConfigFile.xml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/branches/sawdust/plugins/Machine_Learning/tests/doc0.html
===================================================================
--- gate/branches/sawdust/plugins/Machine_Learning/tests/doc0.html              
                (rev 0)
+++ gate/branches/sawdust/plugins/Machine_Learning/tests/doc0.html      
2013-11-08 13:02:21 UTC (rev 17067)
@@ -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>


Property changes on: 
gate/branches/sawdust/plugins/Machine_Learning/tests/doc0.html
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: gate/branches/sawdust/src/test/gate/corpora/TestDocument.java
===================================================================
--- gate/branches/sawdust/src/test/gate/corpora/TestDocument.java       
2013-11-08 10:38:28 UTC (rev 17066)
+++ gate/branches/sawdust/src/test/gate/corpora/TestDocument.java       
2013-11-08 13:02:21 UTC (rev 17067)
@@ -62,16 +62,19 @@
 
   /** Get the name of the test server */
   public static String getTestServerName() {
-    if(testServer != null) return testServer;
-    else{
-      try { 
-        URL url = 
Gate.getClassLoader().getResource("gate/resources/gate.ac.uk/");
-        
-        testServer = url.toExternalForm();//Gate.getUrl().toExternalForm(); }
-      
-      System.out.println("*** "+testServer);}
-      catch(Exception e) { }
+    if(testServer != null)
       return testServer;
+    else {
+      try {
+        URL url =
+            Gate.getClassLoader().getResource("gate/resources/gate.ac.uk/");
+
+        testServer = url.toExternalForm();
+      }
+
+      catch(Exception e) {
+      }
+      return testServer;
     }
   }
 

Modified: gate/branches/sawdust/src/test/gate/creole/annic/test/TestAnnic.java
===================================================================
--- gate/branches/sawdust/src/test/gate/creole/annic/test/TestAnnic.java        
2013-11-08 10:38:28 UTC (rev 17066)
+++ gate/branches/sawdust/src/test/gate/creole/annic/test/TestAnnic.java        
2013-11-08 13:02:21 UTC (rev 17067)
@@ -81,8 +81,8 @@
     // lets create a corpus
     testCorpus = Factory.newCorpus("TestAnnic");
 
-    File directory = new File(new File(new File(new File(new File(new File(Gate
-            .getGateHome(), "src"), "gate"), "resources"), "gate.ac.uk"),
+    File directory = new File(new File(new File(new File(new File(new File(new 
File(Gate
+            .getGateHome(), "src"), "test"), "gate"), "resources"), 
"gate.ac.uk"),
             "tests"), "annic");
     File[] files = directory.listFiles();
     for(int i = 0; i < files.length; i++) {

Deleted: 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/TestMaxentConfigFile.xml
===================================================================
--- 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/TestMaxentConfigFile.xml
     2013-11-08 10:38:28 UTC (rev 17066)
+++ 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/TestMaxentConfigFile.xml
     2013-11-08 13:02:21 UTC (rev 17067)
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>  
-<ML-CONFIG>  
-  <DATASET>  
-  <!-- The type of annotation used as instance -->  
-  <INSTANCE-TYPE>Token</INSTANCE-TYPE>  
-
-  <!-- Both attributes are the same, so the learning is very easy - just learn 
that LOOKUPS should be LOOKUPS! -->
-  <ATTRIBUTE>  
-    <!-- The name given to the attribute -->  
-    <NAME>Lookup(0)</NAME>  
-    <!-- The type of annotation used as attribute -->  
-    <TYPE>Lookup</TYPE>  
-    <!-- N.B. no feature type because we just want to know if the attribute is 
present or not -->      
-    <!-- The position relative to the instance annotation -->  
-    <POSITION>0</POSITION>  
-  </ATTRIBUTE>  
- 
-  <ATTRIBUTE>  
-    <CLASS/>
-    <!-- The name given to the attribute -->  
-    <NAME>Lookup(0)</NAME>  
-    <!-- The type of annotation used as attribute -->  
-    <TYPE>Lookup</TYPE>  
-    <!-- N.B. no feature type because we just want to know if the attribute is 
present or not -->      
-    <!-- The position relative to the instance annotation -->  
-    <POSITION>0</POSITION>  
-  </ATTRIBUTE>  
-  </DATASET>
- 
-  <ENGINE>  
-    <WRAPPER>gate.creole.ml.maxent.MaxentWrapper</WRAPPER>  
-    <OPTIONS>  
-     <CUT-OFF>1</CUT-OFF>
-     <CONFIDENCE-THRESHOLD>0.2</CONFIDENCE-THRESHOLD>  
-     <ITERATIONS>5</ITERATIONS>
-    </OPTIONS>  
-  </ENGINE>  
-</ML-CONFIG>
\ No newline at end of file

Deleted: 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html
===================================================================
--- gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html    
2013-11-08 10:38:28 UTC (rev 17066)
+++ gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html    
2013-11-08 13:02:21 UTC (rev 17067)
@@ -1,46 +0,0 @@
-<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>

Added: gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html
===================================================================
--- gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html    
                        (rev 0)
+++ gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html    
2013-11-08 13:02:21 UTC (rev 17067)
@@ -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>


Property changes on: 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/doc0.html
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/jape/jape-test.xgapp
===================================================================
--- 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/jape/jape-test.xgapp
 2013-11-08 10:38:28 UTC (rev 17066)
+++ 
gate/branches/sawdust/src/test/gate/resources/gate.ac.uk/tests/jape/jape-test.xgapp
 2013-11-08 13:02:21 UTC (rev 17067)
@@ -2,7 +2,7 @@
   <urlList class="gate.util.persistence.CollectionPersistence">
     <localList>
       <gate.util.persistence.PersistenceManager-URLHolder>
-        <urlString>$relpath$../../../../../../plugins/ANNIE</urlString>
+        <urlString>$gatehome$plugins/ANNIE</urlString>
       </gate.util.persistence.PersistenceManager-URLHolder>
     </localList>
     <collectionType>java.util.ArrayList</collectionType>
@@ -258,4 +258,4 @@
       <localMap/>
     </features>
   </application>
-</gate.util.persistence.GateApplication>
\ No newline at end of file
+</gate.util.persistence.GateApplication>

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to