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