def get_person_metadata(self, person_name, use_exact_match=False):
    '\n        \n        Returns all metadata associated with the provided person_name. However, does not actually check\n        to see if the identifier corresponds to a person or not; the class of the identifier will\n        be included in the returned metadata though. DBPedia People only contains people predicate\n        types as well.\n        \n        Use_exact_match toggles between two behaviors: if True, then uses the exact identifier provided\n        to query against the subject table (WHERE = identifier). If False, uses the LIKE operator\n        to attempt to find similar IDs that are not exactly the same. Results will still be a superset\n        of the use_exact_match = True case.\n        \n        :param person_name: \n        :param use_exact_match:\n        :return: \n        '
    person_name = person_name.replace(' ', '_').upper()
    with self.connection.cursor() as cursor:
        if (not use_exact_match):
            cursor.execute('SELECT subject_id, name FROM dbpedia.subjects WHERE upper(name) LIKE %s', ((('%%' + person_name) + '%%'),))
        else:
            cursor.execute('SELECT subject_id, name FROM dbpedia.subjects WHERE upper(name) = %s', (person_name,))
        results = cursor.fetchall()
        if (results is None):
            return []
        subject_id_list = [x[0] for x in results]
        cursor.execute('select dbpedia.subjects.name, predicate, object FROM dbpedia.predicate_object INNER JOIN dbpedia.subjects on (dbpedia.subjects.subject_id = dbpedia.predicate_object.subject_id) WHERE dbpedia.predicate_object.subject_id = ANY(%s)', (subject_id_list,))
        return sorted(cursor.fetchall(), key=(lambda x: x[0]))
Returns all metadata associated with the provided person_name. However, does not actually check
to see if the identifier corresponds to a person or not; the class of the identifier will
be included in the returned metadata though. DBPedia People only contains people predicate
types as well.

Use_exact_match toggles between two behaviors: if True, then uses the exact identifier provided
to query against the subject table (WHERE = identifier). If False, uses the LIKE operator
to attempt to find similar IDs that are not exactly the same. Results will still be a superset
of the use_exact_match = True case.

:param person_name: 
:param use_exact_match:
:return:
def get_person_metadata(self, person_name, use_exact_match=False):
    '\n        \n        Returns all metadata associated with the provided person_name. However, does not actually check\n        to see if the identifier corresponds to a person or not; the class of the identifier will\n        be included in the returned metadata though. DBPedia People only contains people predicate\n        types as well.\n        \n        Use_exact_match toggles between two behaviors: if True, then uses the exact identifier provided\n        to query against the subject table (WHERE = identifier). If False, uses the LIKE operator\n        to attempt to find similar IDs that are not exactly the same. Results will still be a superset\n        of the use_exact_match = True case.\n        \n        :param person_name: \n        :param use_exact_match:\n        :return: \n        '
    person_name = person_name.replace(' ', '_').upper()
    with self.connection.cursor() as cursor:
        if (not use_exact_match):
            cursor.execute('SELECT subject_id, name FROM dbpedia.subjects WHERE upper(name) LIKE %s', ((('%%' + person_name) + '%%'),))
        else:
            cursor.execute('SELECT subject_id, name FROM dbpedia.subjects WHERE upper(name) = %s', (person_name,))
        results = cursor.fetchall()
        if (results is None):
            return []
        subject_id_list = [x[0] for x in results]
        cursor.execute('select dbpedia.subjects.name, predicate, object FROM dbpedia.predicate_object INNER JOIN dbpedia.subjects on (dbpedia.subjects.subject_id = dbpedia.predicate_object.subject_id) WHERE dbpedia.predicate_object.subject_id = ANY(%s)', (subject_id_list,))
        return sorted(cursor.fetchall(), key=(lambda x: x[0]))