Class BabelCategory
java.lang.Object
it.uniroma1.lcl.babelnet.data.BabelCategory
A Wikipedia category associated with a
BabelSynset.- Author:
- navigli, ponzetto
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBabelCategory(String category, it.uniroma1.lcl.jlt.util.Language language) Creates a new instance of aBabelCategory -
Method Summary
Modifier and TypeMethodDescriptionstatic BabelCategoryfromString(String categoryString) Creates a new instance of aBabelCategoryfrom a string with format [language_id]:[category_label], e.g.it.uniroma1.lcl.jlt.util.LanguageGets the language of thisBabelCategory.Returns theBabelLicensefor this Babel categorygetValue()Gets the label of thisBabelCategory.Gets the URI of the Wikipedia page thisBabelCategorycorresponds to.toString()
-
Field Details
-
BABEL_CATEGORY_PREFIX
-
-
Constructor Details
-
BabelCategory
Creates a new instance of aBabelCategory- Parameters:
category- the category stringlanguage- the category language
-
-
Method Details
-
getValue
Gets the label of thisBabelCategory.- Specified by:
getValuein 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.
-
toString
-
getWikipediaURI
Gets the URI of the Wikipedia page thisBabelCategorycorresponds 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
Creates a new instance of aBabelCategoryfrom 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
BabelCategoryfrom an input string
-
getLicense
Returns theBabelLicensefor this Babel category- Returns:
- the license for this category
-