public class WSD extends Object
| Constructor and Description |
|---|
WSD() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayList<String> |
collectSUMOFromWords(String sentence)
Collect all the SUMO terms that are found in the sentence.
|
static ArrayList<String> |
collectWordSenses(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 String |
findWordSendInContextWithPos(String word,
List<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 String |
findWordSenseInContext(String word,
List<String> words)
Return the best guess at the synset for the given word in the
context of the sentence.
|
static List<String> |
findWordSensePOS(String word,
List<String> words,
int POS)
Return the best guess at the synset for the given word in the
context of the sentence.
|
static String |
getBestDefaultSense(String word)
Get the POS-prefixed synset that represents the best guess at
meaning for a word.
|
static String |
getBestDefaultSense(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 String |
getBestDefaultSUMO(String word)
Get the SUMO term that represents the best guess at
meaning for a word.
|
static String |
getBestDefaultSUMOsense(String word,
int pos)
Get the SUMO term that represents the best guess at
meaning for a word.
|
static void |
main(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 ArrayList<String> collectSUMOFromWords(String sentence)
public static ArrayList<String> collectWordSenses(String text)
public static String findWordSenseInContext(String word, List<String> words)
public static String findWordSendInContextWithPos(String word, List<String> words, int pos)
word - - word to disambiguatewords - - words in contextpos - - part of speech of @wordpublic static List<String> findWordSensePOS(String word, List<String> words, int POS)
public static String getBestDefaultSUMOsense(String word, int pos)
public static String getBestDefaultSUMO(String word)
public static String getBestDefaultSense(String word)
public static String getBestDefaultSense(String word, int pos)
public static void testWordWSD()
public static void testSentenceWSD()
public static void main(String[] args)
Copyright © 2015. All rights reserved.