Revision: 17311
          http://sourceforge.net/p/gate/code/17311
Author:   dgmaynard
Date:     2014-02-14 18:49:50 +0000 (Fri, 14 Feb 2014)
Log Message:
-----------
Kaboom! Crash helmets at the ready. All the new grammars.

Modified Paths:
--------------
    gate/trunk/plugins/ANNIE/resources/NE/date.jape
    gate/trunk/plugins/ANNIE/resources/NE/date_pre.jape
    gate/trunk/plugins/ANNIE/resources/NE/email.jape
    gate/trunk/plugins/ANNIE/resources/NE/final.jape
    gate/trunk/plugins/ANNIE/resources/NE/loc_context.jape
    gate/trunk/plugins/ANNIE/resources/NE/name.jape
    gate/trunk/plugins/ANNIE/resources/NE/name_context.jape
    gate/trunk/plugins/ANNIE/resources/NE/number.jape
    gate/trunk/plugins/ANNIE/resources/NE/org_context.jape

Added Paths:
-----------
    gate/trunk/plugins/ANNIE/resources/NE/document_date.jape

Modified: gate/trunk/plugins/ANNIE/resources/NE/date.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/date.jape     2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/date.jape     2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -63,6 +63,9 @@
 Macro: DASH
   {Token.string == "-"}
 
+Macro: DOT
+  {Token.string == "."}
+
 Macro: OF
   {Token.string == "of"}
 
@@ -395,7 +398,6 @@
  :date.TempDate = {rule = "DateDash"}
 
 
-
 Rule:  DateName
 Priority: 20
 // Wed 10 July
@@ -494,16 +496,16 @@
  :date.TempDate = {rule = "DateNumDashRev"}
 
 
-Rule:  DateNumSlash
+Rule:  DateNumSlashDot
 // 01/07/00
 // Note: not 07/00
 
 ( 
-DAY_MONTH_NUM SLASH DAY_MONTH_NUM SLASH YEAR
+DAY_MONTH_NUM (SLASH|DOT) DAY_MONTH_NUM (SLASH|DOT) YEAR
 )
 :date
 -->
- :date.TempDate = {rule = "DateNumSlash"}
+ :date.TempDate = {rule = "DateNumSlashDot"}
 
 
 Rule: ModifierMonth
@@ -615,7 +617,7 @@
 
 (FOUR_DIGIT)
 :date -->
- :date.TempYear = {kind = "positive", rule = "TempYear3"}
+ :date.TempYear = {kind = "negative", rule = "TempYear3"}
 
 
 Rule: YearWords

Modified: gate/trunk/plugins/ANNIE/resources/NE/date_pre.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/date_pre.jape 2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/date_pre.jape 2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -51,6 +51,16 @@
 -->
  :date.TempDate = {rule = "GazDate"}
 
+Rule: GazDateAmbig
+Priority: 200
+(SPACE | {Token.kind == punctuation})
+(
+ {Token.string == "Sun"}
+)
+:date
+(SPACE | {Token.kind == punctuation})
+-->
+ :date.TempDate = {rule = "GazDateAmbig", }
 
 Rule: PersonDateAmbig
 Priority: 100

Added: gate/trunk/plugins/ANNIE/resources/NE/document_date.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/document_date.jape                    
        (rev 0)
+++ gate/trunk/plugins/ANNIE/resources/NE/document_date.jape    2014-02-14 
18:49:50 UTC (rev 17311)
@@ -0,0 +1,33 @@
+Phase: DateHeader
+Input: DCT
+Options: control = appelt
+
+Rule: DCT
+(
+ {DCT}
+):tag
+-->
+{
+gate.AnnotationSet tagSet = (gate.AnnotationSet)bindings.get("tag");
+gate.Annotation tagAnn = (gate.Annotation)tagSet.iterator().next();
+
+gate.FeatureMap features = Factory.newFeatureMap();
+
+
+String s = gate.Utils.stringFor(doc, tagAnn);
+//String content = 
doc.getContent().getContent(tagAnn.getStartNode().getOffset(),
+ //                tagAnn.getEndNode().getOffset()).toString();
+ 
+ if (s.matches("^\\d{8}$") ) {
+String s1 = s.substring(0,4) + "-" + s.substring(4,6) + "-" + s.substring(6,8);
+
+doc.getFeatures().put("document-date", s1);
+}
+
+ }
+
+
+
+
+
+


Property changes on: gate/trunk/plugins/ANNIE/resources/NE/document_date.jape
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: gate/trunk/plugins/ANNIE/resources/NE/email.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/email.jape    2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/email.jape    2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -26,7 +26,7 @@
  (
   {Token.kind == word}|
   {Token.kind == number}
- )+
+ )[1,9]
  (
   {Token.string == "_"}
  )?
@@ -34,7 +34,7 @@
   ({Token.kind == word}|
    {Token.kind == number}|
    {Token.string == "_"}
-  )*
+  )[0,9]
  
  {Token.string == "@"}         
  (
@@ -49,7 +49,7 @@
   {Token.kind == symbol}|
   {Token.kind == punctuation}|
   {Token.kind == number}
- )*
+ )[0,9]
  ({Token.string == "."})?
 (
   {Token.kind == word}|

Modified: gate/trunk/plugins/ANNIE/resources/NE/final.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/final.jape    2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/final.jape    2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -16,11 +16,18 @@
 //note: organization should be included as part of the address ??
 
 Phase: Final
-Input: Token Lookup Jobtitle TempPerson TempLocation TempOrganization TempDate 
TempTime TempYear TempZone Street Postcode Email Url Phone Ip TempIdentifier 
TempSpecs Title Split
+Input: Token Lookup Jobtitle TempPerson TempLocation TempOrganization TempDate 
TempTime TempYear TempZone Street Postcode Email Url Phone Ip TempIdentifier 
TempSpecs Title Split Money
 Options: control = appelt
 
 
 ///////////////////////////////////////////////////////////////
+Rule: Money
+Priority: 200
+(
+ {Money}
+)
+--> 
+{}
 
 Rule: PersonFinal
 Priority: 30
@@ -40,7 +47,7 @@
 if (firstPerson != null && firstPerson.size()>0)
 {
   gate.Annotation personAnn = (gate.Annotation)firstPerson.iterator().next();
-  if (personAnn.getFeatures().containsKey("gender")) features.put("gender", 
personAnn.getFeatures().get("gender"));
+  features.put("gender", personAnn.getFeatures().get("gender"));
 }
   features.put("rule1", person1Ann.getFeatures().get("rule"));
   features.put("rule", "PersonFinal");

Modified: gate/trunk/plugins/ANNIE/resources/NE/loc_context.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/loc_context.jape      2014-02-14 
18:47:07 UTC (rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/loc_context.jape      2014-02-14 
18:49:50 UTC (rev 17311)
@@ -14,7 +14,7 @@
 */
 
 Phase: Loc_Context
-Input: Unknown Token Location
+Input: Unknown Token Location Lookup
 Options: control = appelt
 
 
@@ -81,5 +81,16 @@
 -->
  :loc.Location = {rule = "UnknownLocRegion"}
 
+Rule: LocState
+Priority: 100
+(
+ {Location.locType == city}
+ ({Token.string == ","})?
+)
+(
+ {Lookup.majorType == state}
+):tag
+-->
+:tag.Location = {locType = region, rule = "LocState"}
 
 

Modified: gate/trunk/plugins/ANNIE/resources/NE/name.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/name.jape     2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/name.jape     2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -15,7 +15,7 @@
 
 
 Phase: Name
-Input: Token Lookup Title FirstPerson TempDate Split
+Input: Token Lookup Title FirstPerson TempDate Split UserID Hashtag
 Options: control = appelt debug = false
 
 ///////////////////////////////////////////////////////////////
@@ -28,6 +28,7 @@
  {Title}
  ({Token.string == "."})?
 )
+
 Macro: INITIALS
 (
   ({Token.orth == upperInitial, Token.length =="1"}
@@ -44,13 +45,11 @@
 
 
 Macro: FIRSTNAME
-(
+
  ({FirstPerson.gender == male} |
   {FirstPerson.gender == female})
- |
- (INITIALS)
-)
 
+
 Macro: FIRSTNAMEAMBIG
 (
  {Lookup.majorType == person_first, Lookup.minorType == ambig}
@@ -102,8 +101,16 @@
 -->
 {}
 
- 
 
+
+Rule:NotPerson
+Priority: 1000
+(
+ {Hashtag}|{UserID}
+)
+-->
+{}
+
 Rule:  GazPerson
 Priority: 50
 (
@@ -367,7 +374,7 @@
 ):jobtitle
 (
  (TITLE)?
- ((FIRSTNAME | FIRSTNAMEAMBIG | INITIALS2)
+ ((FIRSTNAME | FIRSTNAMEAMBIG )
  )
  (PREFIX)* 
  (UPPER)
@@ -441,10 +448,23 @@
 -->
 {}
 
+//Rule: LocPersonAmbig3
+//Priority: 100
+// What if the first word is a Lookup for both person_first and Location, and 
the second is an UPPER?
+// Probably a Person not Location
+//
 
+//(
+// {Lookup.majorType == person_first}
+//):loc
+//(
+// (UPPER)
+//):foo
+//-->
+//:loc.TempLocation = {kind = "locName", rule = LocPersonAmbig1}
 
 
-Rule: LocPersonAmbig
+Rule: LocPersonAmbig1
 Priority: 50
 // Location + Surname
 (
@@ -453,12 +473,27 @@
 (
  (PREFIX)* 
  (UPPER)
+ (PERSONENDING)
+):foo
+-->
+:loc.TempLocation = {kind = "locName", rule = LocPersonAmbig1}
+
+Rule: LocPersonAmbig2
+Priority: 50
+// Location + Surname
+(
+ {Lookup.majorType == location}
+):loc
+(
+ (PREFIX)
+ (UPPER)
  (PERSONENDING)?
 ):foo
 -->
-:loc.TempLocation = {kind = "locName", rule = LocPersonAmbig}
+:loc.TempLocation = {kind = "locName", rule = LocPersonAmbig2}
 
 
+
 Rule:  PersonFull
 Priority: 10
 // F.W. Jones
@@ -523,35 +558,7 @@
 -->
 {}
 
-Rule:  PersonFullReverse
-Priority: 5
-// Jones, F.W.
-// don't allow Jones, Fred because too ambiguous
-// Smith, TF
 
-(
- {Token.category ==NNP}
- {Token.string == ","}
- (INITIALS )+ 
- (PERSONENDING)?
-)
-:person -->
-{
- gate.FeatureMap features = Factory.newFeatureMap();
-gate.AnnotationSet personSet = (gate.AnnotationSet)bindings.get("person");
-gate.AnnotationSet firstPerson = 
(gate.AnnotationSet)personSet.get("FirstPerson");
-if (firstPerson != null && firstPerson.size()>0)
-{
-  gate.Annotation personAnn = (gate.Annotation)firstPerson.iterator().next();
-  features.put("gender", personAnn.getFeatures().get("gender"));
-}
-  features.put("kind", "personName");
-  features.put("rule", "PersonFullReverse");
-outputAS.add(personSet.firstNode(), personSet.lastNode(), "TempPerson",
-features);
-}
-
-
 Rule:  PersonSaint
 Priority: 50
 // Note: ensure that it's not a Saints Day first
@@ -584,10 +591,7 @@
 
 // Christian name + Location --> Person's Name
 (
- ({Lookup.majorType == person_first} |
-  (INITIALS
-   {Token.string == "."})
- )
+ {Lookup.majorType == person_first}
   {Lookup.majorType == location}
 )
 :person -->
@@ -748,7 +752,7 @@
 
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXandY"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXandY"}
 
 Rule:  OrgXandY
 Priority: 20
@@ -771,7 +775,7 @@
 
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXandY"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXandY"}
 
 
 Rule:OrgUni
@@ -786,7 +790,7 @@
  {Token.category == NNP})+
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "org", rule = "OrgDept"}
+  :orgName.TempOrganization = {orgType = "other", rule = "OrgDept"}
 
 
 
@@ -807,7 +811,7 @@
  )?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "department", rule = "OrgDept"}
+  :orgName.TempOrganization = {orgType = "department", rule = "OrgDept"}
 
 Rule:  TheOrgXKey
 Priority: 500
@@ -827,7 +831,7 @@
 )
 :org
 -->
-:org.TempOrganization = {kind = "unknown", rule = "TheOrgXKey"}
+:org.TempOrganization = {orgType = "unknown", rule = "TheOrgXKey"}
 
 Rule: NotOrgXKey
 Priority: 150
@@ -845,10 +849,25 @@
 {}
 
 
+
+Rule: NotTheKey
+Priority: 200
+
+(
+ {Token.category == DT}
+ {Lookup.majorType == org_key}
+ ({Lookup.majorType == org_ending})?
+)
+:org
+-->
+{}
+
+
 Rule:  OrgXKey
 Priority: 125
 
 // Aaaa Ltd.
+({Token.category == DT})?
 (
   (UPPER)
   (UPPER)?
@@ -860,7 +879,7 @@
 )
 :org
 -->
-:org.TempOrganization = {kind = "unknown", rule = "TheOrgXKey"}
+:org.TempOrganization = {orgType = "unknown", rule = "OrgXKey"}
 
 
 Rule: NotOrgXEnding
@@ -892,7 +911,7 @@
  {Lookup.majorType == cdg}
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXEnding"}
+  :orgName.TempOrganization = {orgType = "company", rule = "OrgXEnding"}
 
 
 
@@ -907,7 +926,7 @@
  {Lookup.majorType == cdg}
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXEnding"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXEnding"}
 
 Rule:  TheOrgXandYKey
 Priority: 220
@@ -928,7 +947,7 @@
  ({Lookup.majorType == org_ending})?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXandYKey"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXandYKey"}
 
 
 
@@ -953,7 +972,7 @@
  ({Lookup.majorType == org_ending})?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXandYKey"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXandYKey"}
 
 
 Rule:  OrgXsKeyBase
@@ -973,7 +992,7 @@
   {Lookup.majorType == org_base})
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "org", rule = "OrgXsKeybase"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXsKeybase"}
 
 
 
@@ -1022,7 +1041,7 @@
  )?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "TheOrgXBase"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "TheOrgXBase"}
 
 
 Rule:  OrgXBase
@@ -1051,7 +1070,7 @@
  )?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgXBase"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgXBase"}
 
 Rule:  TheBaseofOrg
 Priority: 230
@@ -1072,7 +1091,7 @@
  (UPPER)?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "BaseofOrg"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "BaseofOrg"}
 
 
 
@@ -1093,7 +1112,7 @@
  (UPPER)?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "BaseofOrg"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "BaseofOrg"}
 
 
 
@@ -1109,7 +1128,7 @@
  ({Lookup.majorType == org_ending})?
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "unknown", rule = "OrgPreX"}
+  :orgName.TempOrganization = {orgType = "unknown", rule = "OrgPreX"}
 
 
 
@@ -1125,7 +1144,7 @@
   (CHURCH)
 )
 :orgName -->
-  :orgName.TempOrganization = {kind = "org", rule = "OrgChurch"}
+  :orgName.TempOrganization = {orgType = "other", rule = "OrgChurch"}
 
 
 Rule:OrgPersonAmbig
@@ -1141,7 +1160,7 @@
 )
 :org 
 -->
- :org.TempOrganization= {kind = "unknown", rule = "OrgPersonAmbig"}
+ :org.TempOrganization= {orgType = "unknown", rule = "OrgPersonAmbig"}
 
  
 
@@ -1333,7 +1352,7 @@
 )
 :org
 -->
- :org.TempOrganization= {kind = "orgName", rule = "OrgContext1"}
+ :org.TempOrganization= {orgType = "company", rule = "OrgContext1"}
 
 Rule: OrgContext2
 Priority: 5
@@ -1356,7 +1375,7 @@
  {Token.string == "Laboratories"})
 )
 -->
- :org.TempOrganization= {kind = "orgName", rule = "OrgContext2"}
+ :org.TempOrganization= {orgType = "other", rule = "OrgContext2"}
 
 
 
@@ -1378,7 +1397,7 @@
 )
 :org
 -->
- :org.TempOrganization= {kind = "orgName", rule = "joinOrg"}
+ :org.TempOrganization= {orgType = "company", rule = "joinOrg"}
 
 
 

Modified: gate/trunk/plugins/ANNIE/resources/NE/name_context.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/name_context.jape     2014-02-14 
18:47:07 UTC (rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/name_context.jape     2014-02-14 
18:49:50 UTC (rev 17311)
@@ -17,26 +17,26 @@
 Input: Lookup Unknown Person Token Organization
 Options: control = appelt
 
-Rule: Jobtitle1
-Priority: 50
-(
- {Lookup.majorType == jobtitle}
-)
-(
- {Unknown}
- ({Unknown})?
-)
-:person
--->
-{
+//Rule: Jobtitle1
+//Priority: 50
+//(
+ //{Lookup.majorType == jobtitle}
+//)
+//(
+// {Unknown}
+ //({Unknown})?
+//)
+//:person
+//-->
+//{
 //removes old "Unknown" annotation and adds a "Person" one
-gate.AnnotationSet person = (gate.AnnotationSet) bindings.get("person");
-gate.FeatureMap features = Factory.newFeatureMap();
-features.put("rule", "JobTitle1");
-outputAS.add(person.firstNode(), person.lastNode(), "Person",
-features);
-outputAS.removeAll(person);
-}
+//gate.AnnotationSet person = (gate.AnnotationSet) bindings.get("person");
+//gate.FeatureMap features = Factory.newFeatureMap();
+//features.put("rule", "JobTitle1");
+//outputAS.add(person.firstNode(), person.lastNode(), "Person",
+//features);
+//outputAS.removeAll(person);
+//}
 
 
 Rule:PersonTitle1

Modified: gate/trunk/plugins/ANNIE/resources/NE/number.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/number.jape   2014-02-14 18:47:07 UTC 
(rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/number.jape   2014-02-14 18:49:50 UTC 
(rev 17311)
@@ -23,13 +23,17 @@
 
 
 Macro: MILLION_BILLION
+//note: now includes T for trillion
 ({Token.string == "m"}|
 {Token.string == "million"}|
+{Token.string == "Million"}|
 {Token.string == "b"}|
 {Token.string == "billion"}|
+{Token.string == "Billion"}|
 {Token.string == "bn"}|
 {Token.string == "k"}|
-{Token.string == "K"}
+{Token.string == "K"}|
+{Token.string == "T"}
 )
 
 Macro: NUMBER_WORDS
@@ -97,7 +101,23 @@
 
  -->
   :number.Money = {kind = "number", rule = "MoneySymbolUnit"}
+  
+  Rule:        MoneyUnitSymbol
+ 
+// US $30
 
+(   
+ {Lookup.majorType == currency_unit, Lookup.minorType == pre_amount}
+ ({Token.symbolkind == currency}|
+  {Lookup.majorType == currency_unit, Lookup.minorType == post_amount})
+ (AMOUNT_NUMBER)
+) 
+:number 
+
+ -->
+  :number.Money = {kind = "number", rule = "MoneyUnitSymbol"}
+  
+
 //////////////////////////////////////////////////////////////
 
 // Percentage Rules

Modified: gate/trunk/plugins/ANNIE/resources/NE/org_context.jape
===================================================================
--- gate/trunk/plugins/ANNIE/resources/NE/org_context.jape      2014-02-14 
18:47:07 UTC (rev 17310)
+++ gate/trunk/plugins/ANNIE/resources/NE/org_context.jape      2014-02-14 
18:49:50 UTC (rev 17311)
@@ -42,6 +42,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgContext1");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -68,6 +69,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgContext2");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -88,6 +90,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgContext3");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -109,6 +112,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgContext4");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -132,6 +136,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgContext5");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -160,6 +165,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "JoinOrg");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -188,6 +194,7 @@
 //create the new annotation
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgPerson");
+features.put("orgType ", "company");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 
@@ -211,6 +218,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgConjOrg1");
+features.put("orgType ", "unknown");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -232,6 +240,7 @@
 gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
 gate.FeatureMap features = Factory.newFeatureMap();
 features.put("rule ", "OrgConjOrg2");
+features.put("orgType ", "unknown");
 outputAS.add(org.firstNode(), org.lastNode(), "Organization",
 features);
 outputAS.removeAll(org);
@@ -239,41 +248,25 @@
 
 
 
-Rule: OrgJobtitle
-Priority: 30
-(
- {Unknown.kind == PN}
-):org
-( 
- {Lookup.majorType == jobtitle}
-)
--->
-  {
-gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
-gate.FeatureMap features = Factory.newFeatureMap();
-features.put("rule ", "OrgJobTitle");
-outputAS.add(org.firstNode(), org.lastNode(), "Organization",
-features);
-outputAS.removeAll(org);
-}
+//Rule: OrgJobtitle
+//Priority: 30
+//(
+// {Unknown.kind == PN}
+//):org
+//( 
+// {Lookup.majorType == jobtitle}
+//)
+//-->
+//  {
+//gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
+//gate.FeatureMap features = Factory.newFeatureMap();
+//features.put("rule ", "OrgJobTitle");
+//features.put("orgType ", "company");
+//outputAS.add(org.firstNode(), org.lastNode(), "Organization",
+//features);
+//outputAS.removeAll(org);
+//}
 
 
 
-Rule:LocOrg
-Priority: 20
-// guess that Unknown preceded by Loc is an Org
 
-(
- {Location}
- {Unknown.kind == PN}
-):org
--->
-{
-//removes Unknown annotation, adds a new Org annotation
-gate.AnnotationSet org = (gate.AnnotationSet) bindings.get("org");
-gate.FeatureMap features = Factory.newFeatureMap();
-features.put("rule", "LocOrg");
-outputAS.add(org.firstNode(), org.lastNode(), "Organization",
-features);
-outputAS.removeAll(org);
-}

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


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to