Skip to content

Instantly share code, notes, and snippets.

Avatar
🛫
Looking forward to leave the country.

Bruno Bemfica BrunoCodeman

🛫
Looking forward to leave the country.
View GitHub Profile
@BrunoCodeman
BrunoCodeman / standoff2corenlp.py
Created Sep 26, 2018 — forked from thatguysimon/standoff2corenlp.py
A python script to turn annotated data in standoff format (brat annotation tool) to the formats expected by Stanford NER and Relation Extractor models
View standoff2corenlp.py
# A python script to turn annotated data in standoff format (brat annotation tool) to the formats expected by Stanford NER and Relation Extractor models
# - NER format based on: http://nlp.stanford.edu/software/crf-faq.html#a
# - RE format based on: http://nlp.stanford.edu/software/relationExtractor.html#training
# Usage:
# 1) Install the pycorenlp package
# 2) Run CoreNLP server (change CORENLP_SERVER_ADDRESS if needed)
# 3) Place .ann and .txt files from brat in the location specified in DATA_DIRECTORY
# 4) Run this script