Package it.uniroma1.lcl.babelnet.data
Class BabelCategory
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelCategory
-
-
Field Summary
Fields Modifier and Type Field Description static String
BABEL_CATEGORY_PREFIX
Category prefix
-
Constructor Summary
Constructors Constructor Description BabelCategory(String category, it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of aBabelCategory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BabelCategory
fromString(String categoryString)
Creates a new instance of aBabelCategory
from a string with format [language_id]:[category_label], e.g.it.uniroma1.lcl.jlt.util.Language
getLanguage()
Gets the language of thisBabelCategory
.BabelLicense
getLicense()
Returns theBabelLicense
for this Babel categoryString
getValue()
Gets the label of thisBabelCategory
.String
getWikipediaURI()
Gets the URI of the Wikipedia page thisBabelCategory
corresponds to.String
toString()
-
-
-
Field Detail
-
BABEL_CATEGORY_PREFIX
public static final String BABEL_CATEGORY_PREFIX
Category prefix- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BabelCategory
public BabelCategory(String category, it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of aBabelCategory
- Parameters:
category
- the category stringlanguage
- the category language
-
-
Method Detail
-
getValue
public String getValue()
Gets the label of thisBabelCategory
.- Specified by:
getValue
in interfaceTag<String>
- Returns:
- the label of this
BabelCategory
.
-
getLanguage
public it.uniroma1.lcl.jlt.util.Language getLanguage()
Gets the language of thisBabelCategory
.- Returns:
- the language of this
BabelCategory
.
-
getWikipediaURI
public String getWikipediaURI()
Gets the URI of the Wikipedia page thisBabelCategory
corresponds to. For instance "http://en.wikipedia.org/wiki/Category:Mathematicians_who_committed_suicide" for the English category "Mathematicians_who_committed_suicide" and "http://de.wikipedia.org/wiki/Kategorie:Mitglied_der_Royal_Society" for the German category "Kategorie:Mitglied der Royal Society"- Returns:
- the Wikipedia URI for the page corresponding to this
BabelCategory
.
-
fromString
public static BabelCategory fromString(String categoryString)
Creates a new instance of aBabelCategory
from a string with format [language_id]:[category_label], e.g. EN:Scientist_who_committed_suicide- Parameters:
categoryString
- the string of the category to be retrieved- Returns:
- an instance of a
BabelCategory
from an input string
-
getLicense
public BabelLicense getLicense()
Returns theBabelLicense
for this Babel category- Returns:
- the license for this category
-
-