Person

The class Person is designed to retrieve all the information about a given person. For the moment, it is possible to launch a query with either:

  • her/his full_name;
  • her/his first_name and last_name;
  • the URL/URI corresponding to the person.
⚓

Looking for a Person

Accessing information

Raw information

As we have already It is possible to access raw information by simply looking into the attributes dictionary:

bell_hooks.attributes

This dictionary contains all the information retrieved, so it may be quite noisy.

Via dedicated methods

Names

>>> bell_hooks.get_names()
{
   'dbo:birthName': ['Gloria Jean Watkins _(@en)', 'Gloria Jean Watkins _(@fr)'],
    'foaf:familyName': 'hooks',
    'foaf:givenName': 'bell',
    'foaf:name': ['bell hooks', 'bell hooks _(@en)', 'bell hooks _(@fr)'],
    'foaf:nick': 'bell hooks _(@fr)',
    'rdfs:label': ['Bell hooks _(@ca)',
                   'Bell hooks _(@tr)',
                   'ਬੈਲ ਹੁਕਸ _(@pa)',
                   'Белл хукс _(@ru)',
                   'bell hooks _(@de)',
                   'Bell hooks _(@nl)',
                   'bell hooks _(@es)',
                   'בל הוקס _(@he)',
                   'Bell hooks _(@hu)',
                   'Bell hooks _(@fi)',
                   'ബെൽ ഹുക്\u200cസ് _(@ml)',
                   'Μπελλ χουκς _(@el)',
                   'Bell hooks _(@en)',
                   'Bell hooks _(@id)',
                   'bell hooks _(@en)',
                   'bell hooks _(@fr)',
                   'Bell hooks _(@pl)',
                   'bell hooks _(@nn)',
                   'bell hooks _(@pt)',
                   'Bell Hooks _(@tr)',
                   'ベル・フックス _(@ja)',
                   'bell hooks _(@da)',
                   'Bell hooks _(@sv)',
                   'Bell hooks _(@pt)',
                   '벨 훅스 _(@ko)',
                   'bell hooks _(@it)',
                   'Bell hooks _(@de)',
                   'Bell hooks _(@eo)',
                   '貝爾‧胡克斯 _(@zh)',
                   'bell hooks _(@sl)',
                   'Bell hooks _(@sr)',
                   'bell hooks _(@nb)',
                   'Bell hooks _(@fr)',
                   'بل هوکس _(@fa)',
                   'बेल हुक्स _(@hi)',
                   'Bell hooks _(@sh)',
                   'بيل هوكس _(@ar)',
                   'Bell hooks _(@es)',
                   'Bell Hooks _(@de)',
                   'பெல் ஹூக்சு _(@ta)'],
    'skos:altLabel': ['Gloria Jean Watkins _(@it)',
                      'Hooks _(@sv)',
                      'Gloria Jean Watkins _(@fr)',
                      'Bel huks _(@sh)',
                      'Gloria Jean Watkins _(@en)',
                      'Bell Hooks _(@de)',
                      'Gloria Watkins _(@de)',
                      'Gloria Jean Watkins _(@es)',
                      '貝爾.胡克斯 _(@zh)'],
    'wdt:Twitter_username_(P2002)': 'bellhooks',
    'wdt:birth_name_(P1477)': 'Gloria Jean Watkins _(@en)',
    'wdt:family_name_(P734)': 'http://www.wikidata.org/entity/Q17034171',
    'wdt:given_name_(P735)': ['http://www.wikidata.org/entity/Q4160311',
                              'http://www.wikidata.org/entity/Q734575']
}

External Identifiers

>>> bell_hooks.get_external_ids()
{
    Deutschen_Nationalbibliothek: ([ "http://d-nb.info/gnd/11933447X" ]),
    ark: ([ "http://data.bnf.fr/ark:/12148/cb12519986q#foaf:Person" ]),
    idref: ([ "http://www.idref.fr/03444453X/id" ]),
    viaf: ([ "http://viaf.org/viaf/79115934" ]),
    wikidata: ([ "http://www.wikidata.org/entity/Q259507" ]),
}

Birth

>>> bell_hooks.get_birth_info()
{
    'date': datetime.datetime(1952, 9, 25, 0, 0),
    'name': {'Gloria Jean Watkins _(@en)', 'Gloria Jean Watkins _(@fr)'},
    'other': '1952-09-25+02:00',
    'place': {'http://dbpedia.org/resource/Hopkinsville,_Kentucky',
              'http://fr.dbpedia.org/resource/Hopkinsville',
              'http://fr.dbpedia.org/resource/États-Unis',
              'http://www.wikidata.org/entity/Q845461'}
}

Death

>>> bowie = Person(full_name="David Bowie")
>>> endpoints = [Endpoint.dbpedia_fr, Endpoint.dbpedia, Endpoint.wikidata, Endpoint.bnf]
>>> bowie.add_query_endpoints(endpoints)
>>> bowie.query()
>>> bowie.get_death_info()
{
    cause/manner: ([ "wd:Q3739104","wd:Q623031","dbpedia:Liver_cancer" ]),
    date: ([ "2016-02-10 00:00:00" ]),
    other: ([ "http://data.bnf.fr/date/2016/" ]),
    place: ([ "wd:Q60","New York (New York, États-Unis)" ]),
}

Gender

>>> leslie = Person(full_name="Leslie Nielsen")
>>> endpoints = [Endpoint.dbpedia_fr, Endpoint.dbpedia, Endpoint.wikidata, Endpoint.bnf]
>>> leslie.add_query_endpoints(endpoints)
>>> leslie.query()
>>> leslie.get_gender()
'M'
⚓

Code Documentation

See pyneql.ontology package.