Revision: 17695
          http://sourceforge.net/p/gate/code/17695
Author:   dgmaynard
Date:     2014-03-18 16:44:29 +0000 (Tue, 18 Mar 2014)
Log Message:
-----------
More interesting contextual rules, slowly bumping up the evaluation scores

Modified Paths:
--------------
    gate/trunk/plugins/ANNIE/resources/NE/main.jape
    gate/trunk/plugins/ANNIE/resources/NE/org_context.jape

Modified: gate/trunk/plugins/ANNIE/resources/NE/main.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/main.jape     2014-03-18 16:30:35 UTC 
(rev 17694)
+++ gate/trunk/plugins/ANNIE/resources/NE/main.jape     2014-03-18 16:44:29 UTC 
(rev 17695)
@@ -35,4 +35,4 @@
 name_context
 org_context
 loc_context
-clean
+//clean

Modified: gate/trunk/plugins/ANNIE/resources/NE/org_context.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/org_context.jape      2014-03-18 
16:30:35 UTC (rev 17694)
+++ gate/trunk/plugins/ANNIE/resources/NE/org_context.jape      2014-03-18 
16:44:29 UTC (rev 17695)
@@ -15,7 +15,7 @@
 
 
 Phase: Org_Context
-Input: Token Lookup Organization Unknown Location Person
+Input: Token Lookup Organization Unknown Location Person JobTitle
 Options: control = appelt
 
 
@@ -202,7 +202,34 @@
 outputAS.removeAll(org);
 }
 
+Rule:UnknownJobTitlePerson
 
+(
+ {Unknown.kind == PN}
+):org 
+(
+ ({Token.string == "'"}
+  ({Token.string == "s"})?
+ )?
+{JobTitle}
+ {Person}
+)
+--> 
+ {
+//get the matched annotation(s)
+gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
+
+//create the new annotation
+gate.FeatureMap features = Factory.newFeatureMap();
+features.put("rule ", "UnknownJobTitlePerson");
+features.put("orgType ", "company");
+outputAS.add(org.firstNode(), org.lastNode(), "Organization",
+features);
+
+//delete the old annotation(s)
+outputAS.removeAll(org);
+}
+
 Rule: OrgConjOrg1 
 Priority: 10
 

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


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to