Class BabelCategory

  • All Implemented Interfaces:
    Tag<String>

    public class BabelCategory
    extends Object
    implements Tag<String>
    A Wikipedia category associated with a BabelSynset.
    Author:
    navigli, ponzetto
    • Constructor Detail

      • BabelCategory

        public BabelCategory​(String category,
                             it.uniroma1.lcl.jlt.util.Language language)
        Creates a new instance of a BabelCategory
        Parameters:
        category - the category string
        language - the category language
    • Method Detail

      • getLanguage

        public it.uniroma1.lcl.jlt.util.Language getLanguage()
        Gets the language of this BabelCategory.
        Returns:
        the language of this BabelCategory.
      • getWikipediaURI

        public String getWikipediaURI()
        Gets the URI of the Wikipedia page this BabelCategory 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 a BabelCategory 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 the BabelLicense for this Babel category
        Returns:
        the license for this category