Example #1
0
def question():
    """
    Get input, parse it, get position, get info, get story
    and return latitude, longitude, adress and story in json
    """
    question = request.form['question']
    parser = Parser()
    words = parser.clean_sentence(question)
    latlon = GoogleMap().find_location(words)
    adress = GoogleMap().find_adress(words)
    location = GoogleMap().wiki_search(words)
    infos = WikipediaInformation(location).summary_informations()
    return jsonify(latlon=latlon, adress=adress, infos=infos)