@app.route((route_path + '/next_word'), methods=['POST', 'GET'])
def next_word():
    sentence = request.args.get('sentence', '')
    word = request.args.get('word', '')
    result = self.next_word(sentence, word)
    return flask.jsonify({'state': 'OK', 'result': {'prob': result}})
@app.route((route_path + '/next_word'), methods=['POST', 'GET'])
def next_word():
    sentence = request.args.get('sentence', )
    word = request.args.get('word', )
    result = self.next_word(sentence, word)
    return flask.jsonify({'state': 'OK', 'result': {'prob': result}})