public class WordNetSynsetID extends SynsetID
Usage example:
ResourceID rID = new WordNetSynsetID("wn:00632820n");
Modifier and Type | Field and Description |
---|---|
static int |
ID_LENGTH
ID string length
|
static String |
ID_PREFIX
The WordNet offset prefix
|
id, language, pos, source
Constructor and Description |
---|
WordNetSynsetID(String id)
Builds a WordNet synset ID with version
WordNetVersion.WN_30 |
WordNetSynsetID(String id,
it.uniroma1.lcl.jlt.wordnet.WordNetVersion version)
Constructs the WordNet synset ID
|
Modifier and Type | Method and Description |
---|---|
it.uniroma1.lcl.jlt.wordnet.WordNetVersion |
getVersion()
Return the version of this
WordNetSynsetID |
boolean |
isValid()
Returns true if the synset ID is valid
|
protected void |
setMappingOffsets(HashMap<it.uniroma1.lcl.jlt.wordnet.WordNetVersion,List<String>> versionMapping) |
List<WordNetSynsetID> |
toVersion(it.uniroma1.lcl.jlt.wordnet.WordNetVersion targetVersion)
Obtains a list of
WordNetSynsetID s corresponding to this WordNetSynsetID in the input WordNetVersion |
getSimpleOffset
equals, getID, getLanguage, getPOS, getSource, hashCode, toString, toSynsets, toSynsets
public static final String ID_PREFIX
public static final int ID_LENGTH
public WordNetSynsetID(String id) throws InvalidSynsetIDException
WordNetVersion.WN_30
id
- the synset ID stringInvalidSynsetIDException
- thrown if the synset ID is invalidpublic WordNetSynsetID(String id, it.uniroma1.lcl.jlt.wordnet.WordNetVersion version) throws InvalidSynsetIDException
id
- the synset ID stringversion
- the WordNet versionInvalidSynsetIDException
- thrown if the synset ID is invalidpublic boolean isValid()
SynsetID
public List<WordNetSynsetID> toVersion(it.uniroma1.lcl.jlt.wordnet.WordNetVersion targetVersion)
WordNetSynsetID
s corresponding to this WordNetSynsetID
in the input WordNetVersion
targetVersion
- the target version to convert toWordNetSynsetID
spublic it.uniroma1.lcl.jlt.wordnet.WordNetVersion getVersion()
WordNetSynsetID
WordNetVersion
Copyright © 2016–2018. All rights reserved.