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