(label, film_id, limit=3)
return query
Depricated!
    A method to look up a WikiData film character by a label.

    :param label: label of the entity as str
    :param limit: limit on the result list size
    :return: a query that can be executed against WikiData
    >>> query_wikidata(character_query("Bella", "Q160071"), starts_with=None) == \
    [{'labelright': 'Bella Swan', 'e2': 'http://www.wikidata.org/entity/Q223757', 'label': 'Bella Swan'}]
    True
    >>> query_wikidata(character_query("Anakin", "Q42051"), starts_with=None) == \
    [{'labelright': 'Anakin Skywalker', 'e2': 'http://www.wikidata.org/entity/Q51752', 'label': 'Anakin Skywalker'}, {'labelright': 'Anakin Skywalker', 'e2': 'http://www.wikidata.org/entity/Q51752', 'label': 'Anakin Skywalker'}]
    True
Depricated!
    A method to look up a WikiData film character by a label.
Depricated! A method to look up a WikiData film character by a label .
def character_query(label, film_id, limit=3):
    """
    Depricated!
    A method to look up a WikiData film character by a label.

    :param label: label of the entity as str
    :param limit: limit on the result list size
    :return: a query that can be executed against WikiData
    >>> query_wikidata(character_query("Bella", "Q160071"), starts_with=None) == \
    [{'labelright': 'Bella Swan', 'e2': 'http://www.wikidata.org/entity/Q223757', 'label': 'Bella Swan'}]
    True
    >>> query_wikidata(character_query("Anakin", "Q42051"), starts_with=None) == \
    [{'labelright': 'Anakin Skywalker', 'e2': 'http://www.wikidata.org/entity/Q51752', 'label': 'Anakin Skywalker'}, {'labelright': 'Anakin Skywalker', 'e2': 'http://www.wikidata.org/entity/Q51752', 'label': 'Anakin Skywalker'}]
    True
    """
    query = queries.sparql_prefix
    variables = []
    query += queries.sparql_select
    query += "{"
    sparql_entity_label_inst = sparql_character_label + queries.sparql_get_main_entity_label
    sparql_entity_label_inst = sparql_entity_label_inst.replace("?e1", "e:{}".format(film_id))
    sparql_entity_label_inst = sparql_entity_label_inst.replace("%entitylabels", "\"{}\"".format(label, label))
    variables.append("?e2")
    variables.append("?labelright")
    variables.append("?label")
    query += sparql_entity_label_inst
    query += "}"
    query = query.replace("%queryvariables%", " ".join(variables))
    query += queries.sparql_close.format(limit)
    logger.debug("Querying for entity with variables: {}".format(variables))
    return query
def character_query ( label , film_id , limit = 3 ) : query = queries . sparql_prefix variables = [ ] query += queries . sparql_select query += "{" sparql_entity_label_inst = sparql_character_label + queries . sparql_get_main_entity_label sparql_entity_label_inst = sparql_entity_label_inst . replace ( "?e1" , "e:{}" . format ( film_id ) ) sparql_entity_label_inst = sparql_entity_label_inst . replace ( "%entitylabels" , "\"{}\"" . format ( label , label ) ) variables . append ( "?e2" ) variables . append ( "?labelright" ) variables . append ( "?label" ) query += sparql_entity_label_inst query += "}" query = query . replace ( "%queryvariables%" , " " . join ( variables ) ) query += queries . sparql_close . format ( limit ) logger . debug ( "Querying for entity with variables: {}" . format ( variables ) ) return query