class documentation
class BabelCategory(Tag):
A Wikipedia category associated with a BabelSynset.
| Static Method | category |
Get the prefix of a category in the selected language. |
| Static Method | from |
Create a new instance of a BabelCategory from a string with format <language_id>:<category_label>, e.g. EN:Scientist_who_committed_suicide. |
| Method | __init__ |
init method |
| Property | category |
The category itself, e.g. Scientists who commited suicide. |
| Property | language |
The language of the category label, English, Italian, etc. |
| Property | value |
Returns the tag value. |
| Property | wikipedia |
The URI of the Wikipedia page this BabelCategory corresponds to. |
| Method | __repr__ |
Undocumented |
| Method | __str__ |
Undocumented |
| Constant | _BABEL |
Category prefix (str) |
| Constant | _WIKIPEDIA |
Wikipedia infix |
| Instance Variable | _category |
the category |
| Instance Variable | _language |
Undocumented |
Create a new instance of a BabelCategory from a string with format <language_id>:<category_label>, e.g. EN:Scientist_who_committed_suicide.
| Parameters | |
categorystr | The string of the category to be retrieved. |
| Returns | |
Optional[BabelCategory] | An instance of a BabelCategory from an input string. |
The URI of the Wikipedia page this BabelCategory corresponds to.
Examples:
- for the English category Mathematicians_who_committed_suicide: http://en.wikipedia.org/wiki/Category:Mathematicians_who_committed_suicide
- for the German category Kategorie:Mitglied der Royal Society: http://de.wikipedia.org/wiki/Kategorie:Mitglied_der_Royal_Society