@app.route((ROOT + '/fields'), methods=['POST'])
def tag():
    text = request.form['file']
    short = ((text[:98] + '..') if (len(text) > 100) else text).replace('\n', ' ').replace('\r', ' ')
    print((('create fields of [' + short) + ']'), file=sys.stderr)
    entities = tagger.tag(text)
    return jsonify({'contents': text, 'entity': entities})
@app.route((ROOT + '/fields'), methods=['POST'])
def tag():
    text = request.form['file']
    short = ((text[:98] + '..') if (len(text) > 100) else text).replace('\n', ' ').replace('\r', ' ')
    print((('create fields of [' + short) + ']'), file=sys.stderr)
    entities = tagger.tag(text)
    return jsonify({'contents': text, 'entity': entities})