Class SemanticDictionary
- java.lang.Object
-
- org.aksw.limes.core.measures.measure.semantic.edgecounting.dictionary.SemanticDictionary
-
public class SemanticDictionary extends Object
Implements the semantic dictionary (wordnet) class. Responsible for loading, exporting and closing the semantic dictionary.- Version:
- 1.0
- Author:
- Kleanthi Georgala (georgala@informatik.uni-leipzig.de)
-
-
Constructor Summary
Constructors Constructor Description SemanticDictionary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexportDictionaryToFile()Exports the wordnet database files into one file.edu.mit.jwi.IRAMDictionarygetDictionary()Retrieves the semantic wordnet dictionaryedu.mit.jwi.item.IIndexWordgetIndexWord(String str, edu.mit.jwi.item.POS pos)Retrieves the corresponding IIndexWord of a string in wordnetedu.mit.jwi.item.ISynsetgetSynset(edu.mit.jwi.item.ISynsetID hypernymId)Retrieves the corresponding ISynset of ISynsetID in wordnetedu.mit.jwi.item.IWordgetWord(edu.mit.jwi.item.IWordID wordID)Retrieves the corresponding IWord of an IWordID in wordnetvoidopenDictionaryFromFile()Opens the exported wordnet file and loads it to memoryvoidremoveDictionary()Closes and removes the semantic dictionary from memory
-
-
-
Method Detail
-
exportDictionaryToFile
public void exportDictionaryToFile()
Exports the wordnet database files into one file.
-
removeDictionary
public void removeDictionary()
Closes and removes the semantic dictionary from memory
-
openDictionaryFromFile
public void openDictionaryFromFile()
Opens the exported wordnet file and loads it to memory
-
getWord
public edu.mit.jwi.item.IWord getWord(edu.mit.jwi.item.IWordID wordID)
Retrieves the corresponding IWord of an IWordID in wordnet- Parameters:
wordID- , the input IWordID- Returns:
- the resulting IWord
-
getIndexWord
public edu.mit.jwi.item.IIndexWord getIndexWord(String str, edu.mit.jwi.item.POS pos)
Retrieves the corresponding IIndexWord of a string in wordnet- Parameters:
str- , the input stringpos- , the input string's POS- Returns:
- the resulting IIndexWord
-
getSynset
public edu.mit.jwi.item.ISynset getSynset(edu.mit.jwi.item.ISynsetID hypernymId)
Retrieves the corresponding ISynset of ISynsetID in wordnet- Parameters:
hypernymId- , the input ISynsetID- Returns:
- the resulting ISynset
-
getDictionary
public edu.mit.jwi.IRAMDictionary getDictionary()
Retrieves the semantic wordnet dictionary- Returns:
- the dictionary
-
-