Class WordNetSynsetID
java.lang.Object
it.uniroma1.lcl.kb.ResourceID
it.uniroma1.lcl.kb.SynsetID
it.uniroma1.lcl.babelnet.WordNetSynsetID
Constructs a resource identifier with the specified WordNet synset id.
Usage example:
ResourceID rID = new WordNetSynsetID("wn:00632820n");- Author:
- navigli, vannella
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intID string lengthstatic final StringThe WordNet offset prefixstatic final intOpen English WordNet ID string lengthstatic final StringThe Open English WordNet offset prefixstatic final intWordNet 2020 ID string lengthstatic final StringThe WordNet 2020 offset prefixFields inherited from class ResourceID
id, language, pos, source -
Constructor Summary
ConstructorsConstructorDescriptionBuilds a WordNet synset ID with versionWordNetVersion.WN_30WordNetSynsetID(String id, it.uniroma1.lcl.jlt.wordnet.WordNetVersion version) Constructs the WordNet synset ID -
Method Summary
Modifier and TypeMethodDescriptionit.uniroma1.lcl.jlt.wordnet.WordNetVersionReturn the version of thisWordNetSynsetIDprotected booleanisValid()Returns true if the synset ID is validprotected voidsetMappingOffsets(HashMap<it.uniroma1.lcl.jlt.wordnet.WordNetVersion, List<String>> versionMapping) toVersion(it.uniroma1.lcl.jlt.wordnet.WordNetVersion targetVersion) Obtains a list ofWordNetSynsetIDs corresponding to thisWordNetSynsetIDin the inputWordNetVersionMethods inherited from class SynsetID
getSimpleOffsetMethods inherited from class ResourceID
equals, getID, getLanguage, getPOS, getSource, hashCode, toString, toSynsets, toSynsets
-
Field Details
-
ID_PREFIX
-
WN2020_ID_PREFIX
-
OEWN_ID_PREFIX
-
ID_LENGTH
public static final int ID_LENGTHID string length- See Also:
-
WN2020_ID_LENGTH
public static final int WN2020_ID_LENGTHWordNet 2020 ID string length- See Also:
-
OEWN_ID_LENGTH
public static final int OEWN_ID_LENGTHOpen English WordNet ID string length- See Also:
-
-
Constructor Details
-
WordNetSynsetID
Builds a WordNet synset ID with versionWordNetVersion.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 stringversion- the WordNet version- Throws:
InvalidSynsetIDException- thrown if the synset ID is invalid
-
-
Method Details
-
isValid
-
toVersion
Obtains a list ofWordNetSynsetIDs corresponding to thisWordNetSynsetIDin the inputWordNetVersion- 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 thisWordNetSynsetID- Returns:
WordNetVersion
-
setMappingOffsets
-