Class BabelPointer

java.lang.Object
it.uniroma1.lcl.babelnet.data.BabelPointer
All Implemented Interfaces:
edu.mit.jwi.item.IPointer, SynsetRelationType, Serializable

public class BabelPointer extends Object implements edu.mit.jwi.item.IPointer, SynsetRelationType, Serializable
Default, hard-coded, implementation of IPointer for BabelNet. Models a semantic pointer in BabelNet. Includes an associative (i.e. semantically unspecified) relation.
Author:
navigli, vannella
See Also:
  • Field Details

    • GLOSS_MONOSEMOUS

      public static final BabelPointer GLOSS_MONOSEMOUS
      Gloss related form (monosemous) from WordNet
    • GLOSS_DISAMBIGUATED

      public static final BabelPointer GLOSS_DISAMBIGUATED
      Gloss related form (disambiguated) from WordNet
    • ALSO_SEE

      public static final BabelPointer ALSO_SEE
      Also See from WordNet
    • ANTONYM

      public static final BabelPointer ANTONYM
      Antonym from WordNet
    • ATTRIBUTE

      public static final BabelPointer ATTRIBUTE
      Attribute from WordNet
    • CAUSE

      public static final BabelPointer CAUSE
      Cause from WordNet
    • ENTAILMENT

      public static final BabelPointer ENTAILMENT
      Entailment from WordNet
    • HYPERNYM

      public static final BabelPointer HYPERNYM
      Hypernym from WordNet
    • HYPERNYM_INSTANCE

      public static final BabelPointer HYPERNYM_INSTANCE
      Instance hypernym from WordNet
    • HYPONYM

      public static final BabelPointer HYPONYM
      Hyponym from WordNet
    • HYPONYM_INSTANCE

      public static final BabelPointer HYPONYM_INSTANCE
      Instance hyponym from WordNet
    • HOLONYM_MEMBER

      public static final BabelPointer HOLONYM_MEMBER
      Member holonym from WordNet
    • HOLONYM_SUBSTANCE

      public static final BabelPointer HOLONYM_SUBSTANCE
      Substance holonym from WordNet
    • HOLONYM_PART

      public static final BabelPointer HOLONYM_PART
      Part holonym from WordNet
    • MERONYM_MEMBER

      public static final BabelPointer MERONYM_MEMBER
      Member meronym from WordNet
    • MERONYM_SUBSTANCE

      public static final BabelPointer MERONYM_SUBSTANCE
      Substance meronym from WordNet
    • MERONYM_PART

      public static final BabelPointer MERONYM_PART
      Part meronym from WordNet
    • PARTICIPLE

      public static final BabelPointer PARTICIPLE
      Participle from WordNet
    • PERTAINYM

      public static final BabelPointer PERTAINYM
      Pertainym from WordNet
    • REGION

      public static final BabelPointer REGION
      Domain of synset - REGION from WordNet
    • REGION_MEMBER

      public static final BabelPointer REGION_MEMBER
      Member of this domain from WordNet
    • SIMILAR_TO

      public static final BabelPointer SIMILAR_TO
      Similar To from WordNet
    • TOPIC

      public static final BabelPointer TOPIC
      Domain of synset - TOPIC from WordNet
    • TOPIC_MEMBER

      public static final BabelPointer TOPIC_MEMBER
      Member of this domain - TOPIC from WordNet
    • USAGE

      public static final BabelPointer USAGE
      Domain of synset - USAGE from WordNet
    • USAGE_MEMBER

      public static final BabelPointer USAGE_MEMBER
      Member of this domain - USAGE from WordNet
    • VERB_GROUP

      public static final BabelPointer VERB_GROUP
      Verb Group from WordNet
    • WIBI_HYPERNYM

      public static final BabelPointer WIBI_HYPERNYM
      Hypernym from Wikipedia Bitaxonomy
    • WIKIDATA_HYPERNYM

      public static final BabelPointer WIKIDATA_HYPERNYM
      Hypernym from Wikidata
    • WIKIDATA_MERONYM

      public static final BabelPointer WIKIDATA_MERONYM
      Meronym from Wikidata
    • WIBI_HYPONYM

      public static final BabelPointer WIBI_HYPONYM
      Hyponym from Wikipedia Bitaxonomy
    • WIKIDATA_HYPONYM_INSTANCE

      public static final BabelPointer WIKIDATA_HYPONYM_INSTANCE
      Hyponym instance from Wikidata
    • WIKIDATA_HYPONYM

      public static final BabelPointer WIKIDATA_HYPONYM
      Hyponym from Wikidata
    • ANY_HYPERNYM

      public static final BabelPointer ANY_HYPERNYM
      Hypernyms from all resources
    • ANY_MERONYM

      public static final BabelPointer ANY_MERONYM
      Meronyms from all resources
    • ANY_HOLONYM

      public static final BabelPointer ANY_HOLONYM
      Holonyms from all resources
    • ANY_HYPONYM

      public static final BabelPointer ANY_HYPONYM
      Hyponyms from all resources
  • Method Details

    • getSymbol

      public String getSymbol()
      The symbol in BabelNet data files that is used to indicate this pointer type. Will not be null, empty, or all whitespace. Specified by: getSymbol() in IPointer Returns: the symbol for this pointer
      Specified by:
      getSymbol in interface edu.mit.jwi.item.IPointer
    • getName

      public String getName()
      Returns a user-friendly name of this pointer type for identification purposes. Will not be null, empty, or all whitespace.
      Specified by:
      getName in interface edu.mit.jwi.item.IPointer
      Returns:
      the user-friendly name of this pointer
    • getShortName

      public String getShortName()
      The short name in BabelNet data files that is used to indicate this pointer type.
      Returns:
      the short name of the relation
    • toString

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

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

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

      public static Collection<BabelPointer> values()
      Emulates the Enum.values() function. Returns an unmodifiable collection of all the pointers declared in this class, in the order they are declared.
      Returns:
      the full collection of BabelPointers
    • valueOf

      Returns the pointer type (static final instance) that matches the specified pointer name.
      Parameters:
      name - the name string of the relation
      Returns:
      the BabelPointer corresponding to the given name
      Throws:
      BabelPointer.BabelPointerNotPresentException - if the name does not correspond to a known pointer.
    • isHypernym

      public boolean isHypernym()
      Returns true if the relation is of a hypernymy kind
      Returns:
      true if the relation is of a hypernymy kind
    • isHyponym

      public boolean isHyponym()
      Returns true if the relation is of a hyponymy kind
      Returns:
      true if the relation is of a hyponymy kind
    • isMeronym

      public boolean isMeronym()
      Returns true if the relation is of a meronymy kind
      Returns:
      true if the relation is of a meronymy kind
    • isHolonym

      public boolean isHolonym()
      Returns true if the relation is of a holonymy kind
      Returns:
      true if the relation is of a holonymy kind
    • getRelationGroup

      public BabelPointer.RelationGroup getRelationGroup()
      Returns the kind of relation
      Returns:
      the group the relation belongs to
    • isAutomatic

      public boolean isAutomatic()
      Returns true if the relation is obtained from an automatic resource
      Returns:
      true if the relation is automatic
    • getPointerType

      public static BabelPointer getPointerType(String symbol)
      Returns the pointer type (static final instance) that matches the specified pointer symbol.
      Parameters:
      symbol - the String representation of the semantic relation
      Returns:
      the type of semantic relation
      Throws:
      BabelPointer.BabelPointerNotPresentException - if the symbol does not correspond to a known pointer.