Package it.uniroma1.lcl.babelnet.data
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 ofIPointer
forBabelNet
. Models a semantic pointer inBabelNet
. Includes an associative (i.e. semantically unspecified) relation.- Author:
- navigli, vannella
- See Also:
IPointer
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BabelPointer.BabelPointerNotPresentException
Exception thrown when a BabelPointer cannot be foundstatic class
BabelPointer.RelationGroup
Group of relations (used to bring together relations belonging to the same group)
-
Field Summary
Fields Modifier and Type Field Description static BabelPointer
ALSO_SEE
Also See from WordNetstatic BabelPointer
ANTONYM
Antonym from WordNetstatic BabelPointer
ANY_HOLONYM
Holonyms from all resourcesstatic BabelPointer
ANY_HYPERNYM
Hypernyms from all resourcesstatic BabelPointer
ANY_HYPONYM
Hyponyms from all resourcesstatic BabelPointer
ANY_MERONYM
Meronyms from all resourcesstatic BabelPointer
ATTRIBUTE
Attribute from WordNetstatic BabelPointer
CAUSE
Cause from WordNetstatic BabelPointer
DERIVATIONALLY_RELATED
Derivationally related form from WordNetstatic BabelPointer
ENTAILMENT
Entailment from WordNetstatic BabelPointer
GLOSS_DISAMBIGUATED
Gloss related form (disambiguated) from WordNetstatic BabelPointer
GLOSS_MONOSEMOUS
Gloss related form (monosemous) from WordNetstatic BabelPointer
HOLONYM_MEMBER
Member holonym from WordNetstatic BabelPointer
HOLONYM_PART
Part holonym from WordNetstatic BabelPointer
HOLONYM_SUBSTANCE
Substance holonym from WordNetstatic BabelPointer
HYPERNYM
Hypernym from WordNetstatic BabelPointer
HYPERNYM_INSTANCE
Instance hypernym from WordNetstatic BabelPointer
HYPONYM
Hyponym from WordNetstatic BabelPointer
HYPONYM_INSTANCE
Instance hyponym from WordNetstatic BabelPointer
MERONYM_MEMBER
Member meronym from WordNetstatic BabelPointer
MERONYM_PART
Part meronym from WordNetstatic BabelPointer
MERONYM_SUBSTANCE
Substance meronym from WordNetstatic BabelPointer
PARTICIPLE
Participle from WordNetstatic BabelPointer
PERTAINYM
Pertainym from WordNetstatic BabelPointer
REGION
Domain of synset - REGION from WordNetstatic BabelPointer
REGION_MEMBER
Member of this domain from WordNetstatic BabelPointer
SEMANTICALLY_RELATED
Wikipedia relationsstatic BabelPointer
SIMILAR_TO
Similar To from WordNetstatic BabelPointer
TOPIC
Domain of synset - TOPIC from WordNetstatic BabelPointer
TOPIC_MEMBER
Member of this domain - TOPIC from WordNetstatic BabelPointer
USAGE
Domain of synset - USAGE from WordNetstatic BabelPointer
USAGE_MEMBER
Member of this domain - USAGE from WordNetstatic BabelPointer
VERB_GROUP
Verb Group from WordNetstatic BabelPointer
WIBI_HYPERNYM
Hypernym from Wikipedia Bitaxonomystatic BabelPointer
WIBI_HYPONYM
Hyponym from Wikipedia Bitaxonomystatic BabelPointer
WIKIDATA_HYPERNYM
Hypernym from Wikidatastatic BabelPointer
WIKIDATA_HYPONYM
Hyponym from Wikidatastatic BabelPointer
WIKIDATA_HYPONYM_INSTANCE
Hyponym instance from Wikidatastatic BabelPointer
WIKIDATA_MERONYM
Meronym from Wikidata
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getName()
Returns a user-friendly name of this pointer type for identification purposes.static BabelPointer
getPointerType(String symbol)
Returns the pointer type (static final instance) that matches the specified pointer symbol.BabelPointer.RelationGroup
getRelationGroup()
Returns the kind of relationString
getShortName()
The short name in BabelNet data files that is used to indicate this pointer type.String
getSymbol()
The symbol in BabelNet data files that is used to indicate this pointer type.int
hashCode()
boolean
isAutomatic()
Returns true if the relation is obtained from an automatic resourceboolean
isHolonym()
Returns true if the relation is of a holonymy kindboolean
isHypernym()
Returns true if the relation is of a hypernymy kindboolean
isHyponym()
Returns true if the relation is of a hyponymy kindboolean
isMeronym()
Returns true if the relation is of a meronymy kindString
toString()
static BabelPointer
valueOf(String name)
Returns the pointer type (static final instance) that matches the specified pointer name.static Collection<BabelPointer>
values()
Emulates the Enum.values() function.
-
-
-
Field Detail
-
SEMANTICALLY_RELATED
public static final BabelPointer SEMANTICALLY_RELATED
Wikipedia relations
-
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
-
DERIVATIONALLY_RELATED
public static final BabelPointer DERIVATIONALLY_RELATED
Derivationally related form 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 Detail
-
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 interfaceedu.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 interfaceedu.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
-
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
BabelPointer
s
-
valueOf
public static BabelPointer valueOf(String name) throws BabelPointer.BabelPointerNotPresentException
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.
-
-