|
From: <chr...@us...> - 2011-10-31 09:33:20
|
Revision: 3343
http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3343&view=rev
Author: christinaunger
Date: 2011-10-31 09:33:13 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
[tbsl] fixed parse failures in dbpedia:test
Modified Paths:
--------------
trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Preprocessor.java
trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Scanner.java
trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/templator/SlotBuilder.java
trunk/components-ext/src/main/resources/tbsl/evaluation/dbpedia-test-questions-tagged(ideal).xml
trunk/components-ext/src/main/resources/tbsl/lexicon/english.lex
Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Preprocessor.java
===================================================================
--- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Preprocessor.java 2011-10-31 09:29:27 UTC (rev 3342)
+++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Preprocessor.java 2011-10-31 09:33:13 UTC (rev 3343)
@@ -63,7 +63,9 @@
Pattern compAdjPattern = Pattern.compile("(\\w+/RBR.(\\w+)/JJ)");
// Pattern superAdjPattern = Pattern.compile("(\\w+/RBS.(\\w+)/JJ)"); // TODO "(the most) official languages" vs "the (most official) languages"
+ Pattern howManyPattern = Pattern.compile("(how/WRB.many/JJ)");
Pattern howAdjPattern = Pattern.compile("(\\w+/WRB.(\\w+)(?<!many)/JJ)");
+ Pattern thesameasPattern = Pattern.compile("(the/DT.same/JJ.(\\w+)/NN.as/IN)");
Pattern nprepPattern = Pattern.compile("\\s((\\w+)/NNS?.of/IN)");
Pattern didPattern = Pattern.compile("(?i)(\\s((did)|(do)|(does))/VB.?)\\s");
Pattern prepfrontPattern = Pattern.compile("(\\A\\w+/((TO)|(IN)).)\\w+/WDT"); // TODO (Nicht ganz sauber. Bei P-Stranding immer zwei Querys, hier nur eine.)
@@ -95,11 +97,21 @@
// logger.trace("Replacing " + m.group(1) + " by " + m.group(2)+"/JJS");
// condensedstring = condensedstring.replaceFirst(m.group(1),m.group(2)+"/JJS");
// }
+ m = howManyPattern.matcher(condensedstring);
+ while (m.find()) {
+ logger.trace("Replacing " + m.group(1) + " by how/WLEX many/WLEX");
+ condensedstring = condensedstring.replaceFirst(m.group(1),"how/WLEX many/WLEX");
+ }
m = howAdjPattern.matcher(condensedstring);
while (m.find()) {
logger.trace("Replacing " + m.group(1) + " by " + m.group(2)+"/JJH");
condensedstring = condensedstring.replaceFirst(m.group(1),m.group(2)+"/JJH");
}
+ m = thesameasPattern.matcher(condensedstring);
+ while (m.find()) {
+ logger.trace("Replacing " + m.group(1) + " by " + m.group(2)+"/NNSAME");
+ condensedstring = condensedstring.replaceFirst(m.group(1),m.group(2)+"/NNSAME");
+ }
m = nprepPattern.matcher(condensedstring);
while (m.find()) {
logger.trace("Replacing " + m.group(1) + " by " + m.group(2)+"/NPREP");
Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Scanner.java
===================================================================
--- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Scanner.java 2011-10-31 09:29:27 UTC (rev 3342)
+++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/ltag/parser/Scanner.java 2011-10-31 09:33:13 UTC (rev 3343)
@@ -29,7 +29,7 @@
word_i = "";
}
- if (t.getTerminal().equalsIgnoreCase(word_i)) {
+ if (t.getTerminal().equalsIgnoreCase(word_i) || t.getTerminal().matches(word_i + "\\d")) { // second disjunct: DISAM case
state.side = 'r';
state.pos = 'a';
Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/templator/SlotBuilder.java
===================================================================
--- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/templator/SlotBuilder.java 2011-10-31 09:29:27 UTC (rev 3342)
+++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/templator/SlotBuilder.java 2011-10-31 09:33:13 UTC (rev 3343)
@@ -10,7 +10,7 @@
public class SlotBuilder {
- private String[] noun = {"NN","NNS","NNP","NNPS","NPREP","JJNN","JJNPREP"};
+ private String[] noun = {"NN","NNS","NNP","NNPS","NPREP","JJNN","JJNPREP","NNSAME"};
private String[] adjective = {"JJ","JJR","JJS","JJH"};
private String[] verb = {"VB","VBD","VBG","VBN","VBP","VBZ","PASSIVE","PASSPART","VPASS","VPASSIN","GERUNDIN","VPREP","WHEN","WHERE"};
private String[] preps = {"IN","TO"};
@@ -43,7 +43,7 @@
else if (pos.equals("NNP") || pos.equals("NNPS")) {
type = "RESOURCE";
}
- else if (pos.equals("NPREP")) {
+ else if (pos.equals("NPREP") || pos.equals("NNSAME")) {
type = "PROPERTY";
}
@@ -168,6 +168,13 @@
// "<x,l1,<e,t>,[ l1:[ | SLOT_" + nntoken + "(x), SLOT_" + jjtoken + "(x) ] ],[],[],[" + slotnn + "," + slotjj + "]>"};
result.add(npEntry);
}
+ else if (pos.equals("NNSAME")) {
+ String slot = "SLOT_" + token + "/" + type + "/" + token;
+ String[] nnentry = {token,
+ "(DP N:'" + token.toLowerCase() + "' DP[dp])",
+ "<x,l1,<<e,t>,t>, [ l1:[ z | SLOT_"+token+"(x,z), SLOT_"+token+"(y,z) ] ], [ (l2,y,dp,<<e,t>,t>) ], [ l2=l1 ],["+slot+"]>" };
+ result.add(nnentry);
+ }
}
/* VERBS */
@@ -189,40 +196,28 @@
if (pos.equals("PASSIVE")) {
String[] passEntry1 = {token,
"(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
String[] passEntry2 = {token,
"(S DP[wh] (VP DP[dp] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,wh,<<e,t>,t>),(l3,y,dp,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
- String[] passEntry1empty = {token,
- "(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
- String[] passEntry2empty = {token,
- "(S DP[wh] (VP DP[dp] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,wh,<<e,t>,t>),(l3,y,dp,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,wh,<<e,t>,t>),(l3,y,dp,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,wh,<<e,t>,t>),(l3,y,dp,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
result.add(passEntry1);
result.add(passEntry2);
- result.add(passEntry1empty);
- result.add(passEntry2empty);
}
else if (pos.equals("PASSPART")) {
String[] passpartEntry = {token,
"(NP NP* (VP V:'" + token + "' DP[dp]))",
- "<x,l1,t,[ l1:[ | SLOT_" + token + "(y,x) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[]>"};
- String[] passpartEntryEmpty = {token,
- "(NP NP* (VP V:'" + token + "' DP[dp]))",
- "<x,l1,t,[ l1:[ | empty(y,x) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[]>"};
+ "<x,l1,t,[ l1:[ | SLOT_" + token + "(y,x) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[ | empty(y,x) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[]>"};
result.add(passpartEntry);
- result.add(passpartEntryEmpty);
}
else if (pos.equals("VPASS")) {
String[] passEntry = {token,
"(S DP[subj] (VP V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
- String[] passEntryEmpty = {token,
- "(S DP[subj] (VP V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(y,x) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
result.add(passEntry);
- result.add(passEntryEmpty);
}
else if (pos.equals("VPASSIN")) {
String[] passEntry1 = {token,
@@ -237,68 +232,51 @@
else if (pos.equals("GERUNDIN")) {
String[] gerundinEntry1 = {token,
"(NP NP* V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>"};
+ "<x,l1,t,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[ | empty(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[]>"};
String[] gerundinEntry2 = {token,
"(ADJ V:'" + token + "' DP[obj]))",
- "<x,l1,<e,t>,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>"};
- String[] gerundinEntry1Empty = {token,
- "(NP NP* V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[ | empty(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[]>"};
- String[] gerundinEntry2Empty = {token,
- "(ADJ V:'" + token + "' DP[obj]))",
- "<x,l1,<e,t>,[ l1:[ | empty(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[]>"};
+ "<x,l1,<e,t>,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>" +
+ " ;; <x,l1,<e,t>,[ l1:[ | empty(x,y) ] ],[(l2,y,obj,<<e,t>,t>)],[ l2=l1 ],[]>"};
result.add(gerundinEntry1);
result.add(gerundinEntry2);
- result.add(gerundinEntry1Empty);
- result.add(gerundinEntry2Empty);
}
else if (pos.equals("VPREP")) {
String[] passEntry = {token,
"(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
String[] whEntry = {token,
"(S DP[obj] (VP DP[subj] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
- String[] passEntryEmpty = {token,
- "(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
- String[] whEntryEmpty = {token,
- "(S DP[obj] (VP DP[subj] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
result.add(passEntry);
result.add(whEntry);
- result.add(passEntryEmpty);
- result.add(whEntryEmpty);
}
else if (pos.equals("VBD") || pos.equals("VBZ") || pos.equals("VBP")) {
String[] vEntry = {token,
"(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
- String[] vEntryEmpty = {token,
- "(S DP[subj] (VP V:'" + token + "' DP[obj]))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
result.add(vEntry);
- result.add(vEntryEmpty);
}
else if (pos.equals("VB")) {
String[] whEntry = {token,
"(S DP[obj] (VP DP[subj] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>"};
- String[] whEntryEmpty = {token,
- "(S DP[obj] (VP DP[subj] V:'" + token + "'))",
- "<x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
+ "<x,l1,t,[ l1:[|], l4:[ | SLOT_" + token + "(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[|], l4:[ | empty(x,y) ] ],[(l2,x,subj,<<e,t>,t>),(l3,y,obj,<<e,t>,t>)],[ l2<l1,l3<l1,l4<scope(l2),l4<scope(l3) ],[]>"};
result.add(whEntry);
- result.add(whEntryEmpty);
}
else if (pos.equals("VBG") || pos.equals("VBN")) {
String[] gerEntry = {token,
"(NP NP* (VP V:'" + token + "' DP[dp]))",
- "<x,l1,t,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>"};
- String[] gerEntryEmpty = {token,
- "(NP NP* (VP V:'" + token + "' DP[dp]))",
- "<x,l1,t,[ l1:[ | empty(x,y) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[]>"};
+ "<x,l1,t,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[" + symslot + "]>" +
+ " ;; <x,l1,t,[ l1:[ | empty(x,y) ] ],[(l2,y,dp,<<e,t>,t>)],[ l2=l1 ],[]>"};
+ String[] wasGerEntry = {token,
+ "(S DP[comp] (VP V:'was' DP[subject] V:'" + token + "'))",
+ "<y,l1,t,[ l1:[ | SLOT_" + token + "(y,z) ] ],[(l2,y,comp,<<e,t>,t>), (l3,z,subject,<<e,t>,t>) ],[ l2=l1, l3=l1 ],[" + symslot + "]>"};
result.add(gerEntry);
- result.add(gerEntryEmpty);
+ result.add(wasGerEntry);
}
else if (pos.equals("WHEN")) {
String dateSlot = "SLOT_" + token + "/PROPERTY/" + token + "Date";
@@ -347,8 +325,8 @@
result.add(adjEntry);
}
if (pos.equals("JJH")) {
- String[] howEntry = {"how "+token,
- "(DP WH:'how' ADJ:'" + token.toLowerCase() + "')",
+ String[] howEntry = {token,
+ "(DP WH:'" + token.toLowerCase() + "')",
"<x,l1,<<e,t>,t>,[ l1:[ ?j,x | SLOT_" + token + "(x,j) ] ],[],[],["+slot+"]>"};
result.add(howEntry);
}
@@ -393,15 +371,17 @@
}
/* PREPOSITIONS */
else if (equalsOneOf(pos,preps)) {
- String slot = "SLOT_" + token + "/SYMPROPERTY/";
+ String slot = "SLOT_" + token + "/SYMPROPERTY/" + token;
String[] npAdjunct = {token,
"(NP NP* (PP P:'" + token.toLowerCase() + "' DP[pobj]))",
- "<x,l1,<e,t>,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],["+slot+"]>"};
- String[] npAdjunctEmpty = {token,
- "(NP NP* (PP P:'" + token.toLowerCase() + "' DP[pobj]))",
- "<x,l1,<e,t>,[ l1:[ | empty(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],[]>"};
+ "<x,l1,<e,t>,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],["+slot+"]>" +
+ " ;; <x,l1,<e,t>,[ l1:[ | empty(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],[]>"};
+ String[] vpAdjunct = {token,
+ "(VP VP* (PP P:'" + token.toLowerCase() + "' DP[pobj]))",
+ "<x,l1,t,[ l1:[ | SLOT_" + token + "(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],["+slot+"]>" +
+ " ;; <x,l1,t,[ l1:[ | empty(x,y) ] ],[(l2,y,pobj,<<e,t>,t>)],[l2=l1],[]>"};
result.add(npAdjunct);
- result.add(npAdjunctEmpty);
+ result.add(vpAdjunct);
}
}
Modified: trunk/components-ext/src/main/resources/tbsl/evaluation/dbpedia-test-questions-tagged(ideal).xml
===================================================================
--- trunk/components-ext/src/main/resources/tbsl/evaluation/dbpedia-test-questions-tagged(ideal).xml 2011-10-31 09:29:27 UTC (rev 3342)
+++ trunk/components-ext/src/main/resources/tbsl/evaluation/dbpedia-test-questions-tagged(ideal).xml 2011-10-31 09:33:13 UTC (rev 3343)
@@ -60,7 +60,7 @@
<string>What/WP is/VBZ the/DT revenue/NN of/IN IBM/NNP</string>
</question>
<question id="38">
-<string>Which/WDT states/VBZ border/VBZ Utah/NNP</string>
+<string>Which/WDT states/NNS border/VBZ Utah/NNP</string>
</question>
<question id="13">
<string>In/IN which/WDT country/NN is/VBZ the/DT Limerick/NNP Lake/NNP</string>
Modified: trunk/components-ext/src/main/resources/tbsl/lexicon/english.lex
===================================================================
--- trunk/components-ext/src/main/resources/tbsl/lexicon/english.lex 2011-10-31 09:29:27 UTC (rev 3342)
+++ trunk/components-ext/src/main/resources/tbsl/lexicon/english.lex 2011-10-31 09:33:13 UTC (rev 3343)
@@ -18,8 +18,8 @@
is there || (S V:'is' C:'there' DP[dp]) || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
are there || (S V:'are' C:'there' DP[dp]) || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
- is there || (S DP[dp] V:'is' C:'there') || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
- are there || (S DP[dp] V:'are' C:'there') || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
+ is there || (S DP[dp] (VP V:'is' C:'there')) || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
+ are there || (S DP[dp] (VP V:'are' C:'there')) || <x, l1, t, [ l1:[ | ] ], [ (l2,x,dp,<<e,t>,t>) ], [ l2=l1 ],[]>
// TO BE: YES/NO QUESTIONS
@@ -93,7 +93,7 @@
less than || (DP DET:'less' DET:'than' NUM[num] NP[np]) || <y,l1,<<e,t>,t>,[ l1:[ y,c | count(y,c), less(c,z) ] ],[(l2,y,np,<e,t>),(l3,z,num,e)],[l2=l1,l3=l1],[]> ;; <y,l1,<<e,t>,t>,[ l1:[ y | less(y,z) ] ],[(l2,y,np,<e,t>),(l3,z,num,e)],[l2=l1,l3=l1],[]>
// HOW
- how || (DP DET:'how' ADJ[adj]) || <x,l1,<<e,t>,t>,[ l1:[?x|] ],[ (x,l2,adj,<e,t>) ],[l2=l1],[]>
+ // how || (DP DET:'how' ADJ[adj]) || <x,l1,<<e,t>,t>,[ l1:[?x,|] ],[ (x,l2,adj,<e,t>) ],[l2=l1],[]>
// EMPTY STUFF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|