class documentation

class BabelImage:

View In Hierarchy

An image in BabelNet.

Method __init__ init method
Method add_language Add a new Language.
Instance Variable is_bad True if bad or censored image.
Instance Variable languages The languages of the Wikipedia this image comes from.
Instance Variable license_ Image license.
Instance Variable name The short name / MediaWiki page name for the image, e.g. :
Instance Variable thumb_url The URL thumb to the actual image, e.g. :
Instance Variable url The URL to the actual image, e.g. :
Instance Variable url_source Source of the image URL.
Method __eq__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
def __init__(self, title, language, url, thumb_url, source, license_, is_bad):

init method

Parameters
title:strImage title.
language:strImage language
url:strImage URL.
thumb_url:strImage thumbnail URL.
source:strURL source.
license_:strImage license.
is_bad:boolIs it a bad/censored image?
def add_language(self, language):

Add a new Language.

Parameters
language:LanguageThe language to add.
is_bad: bool =

True if bad or censored image.

languages: Set[Language] =

The languages of the Wikipedia this image comes from.

license_: BabelLicense =

Image license.

name: str =

The short name / MediaWiki page name for the image, e.g. :

    'Haile-newyork-cropforfocus.jpg'
thumb_url: str =

The URL thumb to the actual image, e.g. :

    'http://upload.wikimedia.org/wikipedia/commons/9/94/Haile-newyork-cropforfocus.jpg/120px-Haile-newyork-cropforfocus.jpg'
url: str =

The URL to the actual image, e.g. :

    'http://upload.wikimedia.org/wikipedia/commons/9/94/Haile-newyork-cropforfocus.jpg'
url_source: str =

Source of the image URL.

def __eq__(self, other):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented