public class WSD
extends java.lang.Object
Constructor and Description |
---|
WSD() |
Modifier and Type | Method and Description |
---|---|
static java.util.ArrayList<java.lang.String> |
collectSUMOFromWords(java.lang.String sentence)
Collect all the SUMO terms that are found in the sentence.
|
static java.util.ArrayList<java.lang.String> |
collectWordSenses(java.lang.String text)
Collect all the synsets that represent the best guess at
meanings for all the words in a text given a larger linguistic
context.
|
static java.lang.String |
findWordSendInContextWithPos(java.lang.String word,
java.util.List<java.lang.String> words,
int pos)
Return the best guess at the synset for the given word in the
context of the sentence with the given POS.
|
static java.lang.String |
findWordSenseInContext(java.lang.String word,
java.util.List<java.lang.String> words)
Return the best guess at the synset for the given word in the
context of the sentence.
|
static java.util.List<java.lang.String> |
findWordSensePOS(java.lang.String word,
java.util.List<java.lang.String> words,
int POS)
Return the best guess at the synset for the given word in the
context of the sentence.
|
static java.lang.String |
getBestDefaultSense(java.lang.String word)
Get the POS-prefixed synset that represents the best guess at
meaning for a word.
|
static java.lang.String |
getBestDefaultSense(java.lang.String word,
int pos)
Get the POS-prefixed synset that represents the best guess at
meaning for a word with a given part of speech.
|
static java.lang.String |
getBestDefaultSUMO(java.lang.String word)
Get the SUMO term that represents the best guess at
meaning for a word.
|
static java.lang.String |
getBestDefaultSUMOsense(java.lang.String word,
int pos)
Get the SUMO term that represents the best guess at
meaning for a word.
|
static void |
main(java.lang.String[] args)
A main method, used only for testing.
|
static void |
testSentenceWSD()
A method used only for testing.
|
static void |
testWordWSD()
A method used only for testing.
|
public static java.util.ArrayList<java.lang.String> collectSUMOFromWords(java.lang.String sentence)
public static java.util.ArrayList<java.lang.String> collectWordSenses(java.lang.String text)
public static java.lang.String findWordSenseInContext(java.lang.String word, java.util.List<java.lang.String> words)
public static java.lang.String findWordSendInContextWithPos(java.lang.String word, java.util.List<java.lang.String> words, int pos)
word
- - word to disambiguatewords
- - words in contextpos
- - part of speech of @wordpublic static java.util.List<java.lang.String> findWordSensePOS(java.lang.String word, java.util.List<java.lang.String> words, int POS)
public static java.lang.String getBestDefaultSUMOsense(java.lang.String word, int pos)
public static java.lang.String getBestDefaultSUMO(java.lang.String word)
public static java.lang.String getBestDefaultSense(java.lang.String word)
public static java.lang.String getBestDefaultSense(java.lang.String word, int pos)
public static void testWordWSD()
public static void testSentenceWSD()
public static void main(java.lang.String[] args)