Class ResourceID

java.lang.Object
it.uniroma1.lcl.kb.ResourceID
Direct Known Subclasses:
FrameNetID, GeoNamesID, MSTermID, OmegaWikiID, ResourceWithLemmaID, SynsetID, VerbNetID, WikidataID, WiktionaryID

public abstract class ResourceID extends Object
A basic resource identifier.
Author:
navigli, vannella
See Also:
  • Field Details

    • id

      protected final String id
      Id of a ResourceID
    • pos

      protected it.uniroma1.lcl.jlt.util.POS pos
      POS of the resource ID, if available
    • source

      protected SenseSource source
      Source of the resource ID
    • language

      protected it.uniroma1.lcl.jlt.util.Language language
      Language of the resource ID, if available
  • Constructor Details

    • ResourceID

      protected ResourceID(String id, SenseSource source)
      Builds the ResourceID
      Parameters:
      id - id of the resource
      source - source of the resource
  • Method Details

    • getID

      public String getID()
      Returns the ResourceID ID
      Returns:
      the ResourceID ID
    • getPOS

      public it.uniroma1.lcl.jlt.util.POS getPOS()
      The part of speech tag associated with the given ID (default is null).
      Returns:
      the POS tag of the resource
    • getSource

      public SenseSource getSource()
      Gets the source associated with the given ID
      Returns:
      the associated source
    • getLanguage

      public it.uniroma1.lcl.jlt.util.Language getLanguage()
      Gets the language associated with the given ID (default is null)
      Returns:
      the associated language
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toSynsets

      public List<BabelSynset> toSynsets()
      Converts the ID to a collection of BabelSynsets
      Returns:
      the corresponding synsets (in most cases, it will be just a single synset)
    • toSynsets

      public List<BabelSynset> toSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)
      Converts the ID to a collection of BabelSynsets
      Parameters:
      targetLanguages - the languages to populate the synsets with
      Returns:
      the corresponding synsets (in most cases, it will be just a single synset)