Class WordNetSynsetID


public class WordNetSynsetID extends SynsetID
Constructs a resource identifier with the specified WordNet synset id.

Usage example:

ResourceID rID = new WordNetSynsetID("wn:00632820n");
Author:
navigli, vannella
  • Field Details

  • Constructor Details

    • WordNetSynsetID

      public WordNetSynsetID(String id) throws InvalidSynsetIDException
      Builds a WordNet synset ID with version WordNetVersion.WN_30
      Parameters:
      id - the synset ID string
      Throws:
      InvalidSynsetIDException - thrown if the synset ID is invalid
    • WordNetSynsetID

      public WordNetSynsetID(String id, it.uniroma1.lcl.jlt.wordnet.WordNetVersion version) throws InvalidSynsetIDException
      Constructs the WordNet synset ID
      Parameters:
      id - the synset ID string
      version - the WordNet version
      Throws:
      InvalidSynsetIDException - thrown if the synset ID is invalid
  • Method Details

    • isValid

      protected boolean isValid()
      Description copied from class: SynsetID
      Returns true if the synset ID is valid
      Specified by:
      isValid in class SynsetID
      Returns:
      a boolean with the synset ID validity
    • toVersion

      public List<WordNetSynsetID> toVersion(it.uniroma1.lcl.jlt.wordnet.WordNetVersion targetVersion)
      Obtains a list of WordNetSynsetIDs corresponding to this WordNetSynsetID in the input WordNetVersion
      Parameters:
      targetVersion - the target version to convert to
      Returns:
      a list of WordNetSynsetIDs
    • getVersion

      public it.uniroma1.lcl.jlt.wordnet.WordNetVersion getVersion()
      Return the version of this WordNetSynsetID
      Returns:
      WordNetVersion
    • setMappingOffsets

      protected void setMappingOffsets(HashMap<it.uniroma1.lcl.jlt.wordnet.WordNetVersion, List<String>> versionMapping)