Revision: 17828
http://sourceforge.net/p/gate/code/17828
Author: markagreenwood
Date: 2014-04-14 15:30:29 +0000 (Mon, 14 Apr 2014)
Log Message:
-----------
added hers and herself to the pronominal coref module, quite why they were
missing is beyond me
Modified Paths:
--------------
gate/trunk/src/main/gate/creole/coref/PronominalCoref.java
Modified: gate/trunk/src/main/gate/creole/coref/PronominalCoref.java
===================================================================
--- gate/trunk/src/main/gate/creole/coref/PronominalCoref.java 2014-04-14
12:39:04 UTC (rev 17827)
+++ gate/trunk/src/main/gate/creole/coref/PronominalCoref.java 2014-04-14
15:30:29 UTC (rev 17828)
@@ -330,8 +330,10 @@
return _resolve$HE$HIM$HIS$HIMSELF$(currPronoun,prnSentIndex);
}
else if (strPronoun.equalsIgnoreCase("SHE") ||
- strPronoun.equalsIgnoreCase("HER")) {
- return _resolve$SHE$HER$(currPronoun,prnSentIndex);
+ strPronoun.equalsIgnoreCase("HER") ||
+ strPronoun.equalsIgnoreCase("HERS") ||
+ strPronoun.equalsIgnoreCase("HERSELF")) {
+ return _resolve$SHE$HER$HERS$HERSELF$(currPronoun,prnSentIndex);
}
else if (strPronoun.equalsIgnoreCase("IT") ||
strPronoun.equalsIgnoreCase("ITS") ||
@@ -435,7 +437,7 @@
bestAntecedent = currPerson;
}
else {
- bestAntecedent =
_chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$(bestAntecedent,currPerson,pronoun);
+ bestAntecedent =
_chooseAntecedent$HE$HIM$HIS$SHE$HER$HERS$HIMSELF$HERSELF$(bestAntecedent,currPerson,pronoun);
}
}
}
@@ -450,7 +452,7 @@
/** --- */
- private Annotation _resolve$SHE$HER$(Annotation pronoun, int sentenceIndex) {
+ private Annotation _resolve$SHE$HER$HERS$HERSELF$(Annotation pronoun, int
sentenceIndex) {
//0. preconditions
assert (pronoun.getType().equals(TOKEN_ANNOTATION_TYPE));
@@ -458,7 +460,9 @@
pronoun.getFeatures().get(TOKEN_CATEGORY_FEATURE_NAME).equals(PRP$_CATEGORY));
String pronounString =
(String)pronoun.getFeatures().get(TOKEN_STRING_FEATURE_NAME);
assert (pronounString.equalsIgnoreCase("SHE") ||
- pronounString.equalsIgnoreCase("HER"));
+ pronounString.equalsIgnoreCase("HER") ||
+ pronounString.equalsIgnoreCase("HERS") ||
+ pronounString.equalsIgnoreCase("HERSELF"));
//1.
boolean antecedentFound = false;
@@ -486,7 +490,7 @@
bestAntecedent = currPerson;
}
else {
- bestAntecedent =
_chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$(bestAntecedent,currPerson,pronoun);
+ bestAntecedent =
_chooseAntecedent$HE$HIM$HIS$SHE$HER$HERS$HIMSELF$HERSELF$(bestAntecedent,currPerson,pronoun);
}
}
}
@@ -885,7 +889,7 @@
/** --- */
- private Annotation _chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$(Annotation
ant1, Annotation ant2, Annotation pronoun) {
+ private Annotation
_chooseAntecedent$HE$HIM$HIS$SHE$HER$HERS$HIMSELF$HERSELF$(Annotation ant1,
Annotation ant2, Annotation pronoun) {
//0. preconditions
assert (null != ant1);
@@ -896,6 +900,8 @@
String pronounString =
(String)pronoun.getFeatures().get(TOKEN_STRING_FEATURE_NAME);
assert (pronounString.equalsIgnoreCase("SHE") ||
pronounString.equalsIgnoreCase("HER") ||
+ pronounString.equalsIgnoreCase("HERS") ||
+ pronounString.equalsIgnoreCase("HERSELF") ||
pronounString.equalsIgnoreCase("HE") ||
pronounString.equalsIgnoreCase("HIM") ||
pronounString.equalsIgnoreCase("HIS") ||
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/NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs