public class RelationString extends Object implements Comparable<RelationString>
| Constructor and Description |
|---|
RelationString(String m_pred,
String m_normPred,
String m_posPred) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(RelationString o) |
void |
correctNormalization()
Normalizes the predicate - takes predicate normalized by TextRunner and
applies rule based normalization:
if predicate doesn't start with a letter or a abbreviated aux -
return empty predicate
transform to lower case
omit adverbs (RB pos-tag)
omit quasi-modals: "used to VB", "ought to VB", "be able to VB",
"have to VB"
omit modals: (MD pos-tag)
handle "have": change "have VBN/VB/VBD" to "VBD"
handle "be": reverse TextRunner normalization of "be VBN" to
unnormalized form, omit "be" in "be VBG" unless is "be going to VB",
which is treated like a quasi-modal
handle "do": omit "do" in "do VB" expressions
handle "have" again to solve some extreme cases where it needs to be
applied twice ('d have had to have been doing")
if what's left is "be" or "do" or "be be" or "do do" - return empty
predicate since this predicate is not informative
if what's left doesn't start with a letter or a abbreviated aux -
return empty predicate since the extraction was bad
if what's contains "be be " or "do do " or "have have " - return
empty predicate since the extraction was bad
|
boolean |
equals(Object obj) |
String |
getNormPred() |
String |
getPosPred() |
String |
getPred() |
int |
hashCode() |
static void |
main(String[] args) |
void |
setNormPred(String m_normPred) |
void |
setPosPred(String m_posPred) |
void |
setPred(String m_pred) |
void |
setRelationString(RelationString other) |
String |
toString() |
public void setRelationString(RelationString other)
public String getPred()
public void setPred(String m_pred)
public String getNormPred()
public void setNormPred(String m_normPred)
public String getPosPred()
public void setPosPred(String m_posPred)
public int compareTo(RelationString o)
compareTo in interface Comparable<RelationString>public void correctNormalization()
IllegalArgumentExceptionpublic static void main(String[] args)
Copyright © 2010-2013 University of Washington CSE. All Rights Reserved.