|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.patterns.LinkageWord
public final class LinkageWord
This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).
LinkageWord.java represents a word in a Linkage.
Nested Class Summary | |
---|---|
static class |
LinkageWord.Type
Type of LinkageWords |
Field Summary | |
---|---|
java.util.List<Link> |
contexts
Links to other words |
static java.util.EnumSet<LinkageWord.Type> |
DUMMIES
Types that become dummies when essentialized |
static java.util.EnumSet<LinkageWord.Type> |
INTERESTING
Type for interesting words (NOUN|NUMBER|DATE) |
static int |
MAXBITS
Maximal number of bits generated by toArray |
static int |
MAXINT
|
static |
pronouns
Contains the references that will be resolved |
int |
stopWordNum
Stores the stopword-number, if type==STOPWORD |
static |
stopWords
Contains stopwords |
java.util.EnumSet<LinkageWord.Type> |
type
Stores the type of this word |
java.lang.String |
word
Name of the word |
Constructor Summary | |
---|---|
LinkageWord(java.lang.String w)
Constructs a LinkageWord from a string like "man.n" |
Method Summary | |
---|---|
void |
addLink(Link l)
Adds a link |
void |
adoptWord(LinkageWord w)
Adopts the argument's word |
boolean |
equals(java.lang.Object o)
Two LinkageWords are equal if their words are equal Treats numbers and dates appropriately |
LinkageWord |
essentialize()
Returns an essentialized copy of the given LinkageWord The new LinkageWord has no contexts, dummies are simplified |
int |
hashCode()
Returns a hashCode |
boolean |
is(java.util.EnumSet<LinkageWord.Type> n)
Returns TRUE if this type set contains one of the given types |
boolean |
is(LinkageWord.Type n)
Returns TRUE if this type set contains the given type |
void |
set(java.lang.String w)
Sets the word (and types) of this LinkageWord |
double |
similarity(LinkageWord w)
Returns a similarity measure |
int |
toArray(int[] array,
int pos,
int offset)
Stores an integer representation of this word in an array, starting at pos, adding offset and returning the new pos. |
java.lang.String |
toString()
Returns a String representation (for debugging) |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.EnumSet<LinkageWord.Type> INTERESTING
public static final java.util.EnumSet<LinkageWord.Type> DUMMIES
public java.lang.String word
public java.util.List<Link> contexts
public java.util.EnumSet<LinkageWord.Type> type
public int stopWordNum
public static final int MAXBITS
public staticpronouns
public staticstopWords
public static final int MAXINT
Constructor Detail |
---|
public LinkageWord(java.lang.String w)
Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public void set(java.lang.String w)
public void addLink(Link l)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean is(LinkageWord.Type n)
public boolean is(java.util.EnumSet<LinkageWord.Type> n)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public double similarity(LinkageWord w)
public LinkageWord essentialize()
public int toArray(int[] array, int pos, int offset)
public void adoptWord(LinkageWord w)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |