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
|
static int |
OEWN_ID_LENGTH
Open English WordNet ID string length
|
static String |
OEWN_ID_PREFIX
The Open English WordNet offset prefix
|
static int |
WN2020_ID_LENGTH
WordNet 2020 ID string length
|
static String |
WN2020_ID_PREFIX
The WordNet 2020 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 |
protected 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
WordNetSynsetIDs corresponding to this WordNetSynsetID in the input WordNetVersion |
getSimpleOffsetequals, getID, getLanguage, getPOS, getSource, hashCode, toString, toSynsets, toSynsetspublic static final String ID_PREFIX
public static final String WN2020_ID_PREFIX
public static final String OEWN_ID_PREFIX
public static final int ID_LENGTH
public static final int WN2020_ID_LENGTH
public static final int OEWN_ID_LENGTH
public WordNetSynsetID(String id) throws InvalidSynsetIDException
WordNetVersion.WN_30id - 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 invalidprotected boolean isValid()
SynsetIDpublic List<WordNetSynsetID> toVersion(it.uniroma1.lcl.jlt.wordnet.WordNetVersion targetVersion)
WordNetSynsetIDs corresponding to this WordNetSynsetID in the input WordNetVersiontargetVersion - the target version to convert toWordNetSynsetIDspublic it.uniroma1.lcl.jlt.wordnet.WordNetVersion getVersion()
WordNetSynsetIDWordNetVersionCopyright © 2016–2022. All rights reserved.