I have custom tagged NER Data in the following format.
[("Free Farmers' Market Organ Concert - The Madison Symphony Orchestra\nSkip to main content Enable accessibility for visually impaired Open the accessibility menu\nHide Unhide\nThis event has passed.\nEvent Navigation\nAn Adventure with Fused Glass II SOLD OUT\nChamber Music Meets the Beatles\nFree Organ Concert\nConcerts & Events Menu View Calendar\nBuy Single Tickets\nSubscribe Now\nFAQs & Safety\nMadison Symphony Orchestra Concerts\nOverture Concert Organ Performances\nSpecial Events\nCustomer Service\nSaturday, August 28, 2021 11:00 a.m.\nMusic Program: Beethoven String Quartet\xa0No.\xa03\xa0in D major,\xa0Op.\xa018,\xa0No.\xa03 Widor Allegro from Symphony No. 6 Debussy Clair de Lune Widor Toccata from Symphony No. 5\nFeaturing: Greg Zelek , Organ Hillary Hempel , Violin Laura Burns , Violin Chris Dozoryst , Viola Derek Handley , Cello\nFree Farmers’ Market Organ Concert\nJoin Principal Organist Greg Zelek and MSO Musicians Laura Burns, Chris Dozoryst, Derek Handley, and Hillary Hempel for a FREE Concert in Overture Hall\nI can’t think of a better way to get back to sharing live music from Overture Hall than with a free Farmers’ Market Organ Concert With a first half of music performed by a string quartet made up of musicians from our own Madison Symphony Orchestra, our audience will get a chance to hear the power and beauty of the Overture Concert Organ and other instruments in this free event. The quartet will perform the music of Beethoven to ring in the spectacular MSO season and I will give a sneak peak of what I will be performing to open our 2021-22 Organ Series in October. Hope to see you there -Greg Zelek\nView the Program Book\nStep into the cool expanse of Overture Hall during the Dane County Farmers’ Market on the Capitol Square to enjoy the gift of beautiful music with the Madison Symphony Orchestra’s Overture Concert Organ. Bring your family and friends for a relaxing 45-minute free concert. No tickets or reservations are needed and all ages are welcome\nSPONSORS: Cyrena and Lee Pondrom\nOverture Center Safety Policies Update, August 19, 2021\nPlease note that Overture Center announced COVID-19 safety policies that will be in effect for our Farmers’ Market Organ concert on August 28, 2021. The policies will apply to patrons, artists, employees, volunteers and the community. Everyone who enters the Overture Center building will be required to adhere to the following requirements:\nmust wear a face mask that covers nose and mouth. must be fully vaccinated, meaning their last dose must have been administered at least 14 days before the event. must show proof of a COVID-19 vaccination with a physical vaccination card, a photograph of the card or a digital vaccination record, or a negative COVID-19 test result taken within 72 hours prior to the performance, with a photo identification, such as a driver’s license, passport or student identification.\nVisit our 21/22 Season Q&A page for answers to frequently asked questions: https://madisonsymphony.org/faq\nDetails\nDate:\nAugust 28\nEvent Categories: Organ , Special Events\nVenue\nOverture Center for the Arts\n201 State Street\nMadison ,\nWI\n53703\nUnited States\nGoogle Calendar iCal Export\nEvent Navigation\nAn Adventure with Fused Glass II SOLD OUT\nChamber Music Meets the Beatles\nDate:\nAugust 28\nEvent Categories: Organ , Special Events\nVenue\nOverture Center for the Arts\n201 State Street\nMadison ,\nWI\n53703\nUnited States\nGoogle Calendar iCal Export\nEvent Navigation\nAn Adventure with Fused Glass II SOLD OUT\nChamber Music Meets the Beatles",
{'entities': [(389, 415, 'organization', 'Madison Symphony Orchestra'),
(3014, 3019, 'soloist_role', 'Organ'),
(254, 285, 'production_name', 'Chamber Music Meets the Beatles'),
(212, 244, 'production_name', 'An Adventure with Fused Glass II'),
(739, 745, 'soloist_role', 'Violin'),
(425, 460, 'production_name', 'Overture Concert Organ Performances'),
(2149, 2178, 'production_name', 'Farmers’ Market Organ concert'),
(2182, 2197, 'performance_date', 'August 28, 2021'),
(602, 607, 'person', 'Widor'),
(722, 736, 'person', 'Hillary Hempel'),
(1220, 1246, 'organization', 'Madison Symphony Orchestra'),
(948, 962, 'person', 'Hillary Hempel'),
(806, 811, 'soloist_role', 'Cello'),
(658, 663, 'person', 'Widor'),
(760, 766, 'soloist_role', 'Violin'),
(3275, 3280, 'soloist_role', 'Organ'),
(929, 942, 'person', 'Derek Handley'),
(3167, 3199, 'production_name', 'An Adventure with Fused Glass II'),
(985, 998, 'auditorium', 'Overture Hall'),
(286, 304, 'production_name', 'Free Organ Concert'),
(2309, 2324, 'auditorium', 'Overture Center'),
(677, 691, 'creative_work', 'Symphony No. 5'),
(3428, 3460, 'production_name', 'An Adventure with Fused Glass II'),
(1418, 1427, 'person', 'Beethoven'),
(1315, 1337, 'production_name', 'Overture Concert Organ'),
(1094, 1128, 'production_name', 'free Farmers’ Market Organ Concert'),
(1971, 1977, 'organization', 'Cyrena'),
(1805, 1827, 'production_name', 'Overture Concert Organ'),
(900, 911, 'person', 'Laura Burns'),
(703, 713, 'person', 'Greg Zelek'),
(871, 881, 'person', 'Greg Zelek'),
(0, 34, 'production_name', "Free Farmers' Market Organ Concert"),
(621, 635, 'creative_work', 'Symphony No. 6'),
(1068, 1081, 'auditorium', 'Overture Hall'),
(545, 554, 'person', 'Beethoven'),
(716, 721, 'soloist_role', 'Organ'),
(790, 803, 'person', 'Derek Handley'),
(784, 789, 'soloist_role', 'Viola'),
(812, 846, 'production_name', 'Free Farmers’ Market Organ Concert'),
(1544, 1549, 'soloist_role', 'Organ'),
(746, 757, 'person', 'Laura Burns'),
(664, 671, 'creative_work_element', 'Toccata'),
(1455, 1458, 'organization', 'MSO'),
(644, 657, 'creative_work', 'Clair de Lune'),
(1776, 1804, 'organization', 'Madison Symphony Orchestra’s'),
(1680, 1707, 'organization', 'Dane County Farmers’ Market'),
(852, 870, 'soloist_role', 'Principal Organist'),
(3043, 3071, 'auditorium', 'Overture Center for the Arts'),
(2067, 2082, 'auditorium', 'Overture Center'),
(3304, 3332, 'auditorium', 'Overture Center for the Arts'),
(37, 67, 'organization', 'The Madison Symphony Orchestra'),
(1536, 1540, 'performance_date', '2021'),
(608, 615, 'creative_work_element', 'Allegro'),
(503, 518, 'performance_date', 'August 28, 2021'),
(1592, 1602, 'person', 'Greg Zelek'),
(1994, 2009, 'auditorium', 'Overture Center'),
(519, 528, 'performance_starttime', '11:00 a.m'),
(1655, 1668, 'auditorium', 'Overture Hall'),
(3470, 3501, 'production_name', 'Chamber Music Meets the Beatles'),
(555,
601,
'creative_work',
'String Quartet\xa0No.\xa03\xa0in D major,\xa0Op.\xa018,\xa0No.\xa03'),
(3209, 3240, 'production_name', 'Chamber Music Meets the Beatles'),
(913, 927, 'person', 'Chris Dozoryst'),
(886, 889, 'organization', 'MSO'),
(636, 643, 'person', 'Debussy'),
(767, 781, 'person', 'Chris Dozoryst'),
(1982, 1993, 'organization', 'Lee Pondrom')]})]
Is it possible to convert this to CoNNL format. polm23 helped me in stackoverflow with conversion to a plain CoNNL format. I also want to know if we tag the data using prodigy, then is it possible to download in CoNLL format. I am kind of stuck with this format.
Code
import spacy
data = ....text data...
nlp = spacy.blank("en")
for text, labels in data:
doc = nlp(text)
ents = []
for start, end, label in labels["entities"]:
ents.append(doc.char_span(start, end, label))
doc.ents = ents
for tok in doc:
label = tok.ent_iob_
if tok.ent_iob_ != "O":
label += '-' + tok.ent_type_
print(tok, label, sep="\t")