Class 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 Detail

      • SemanticDictionary

        public SemanticDictionary()
    • 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 string
        pos - , 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