How to convert a csv to IOB format in python

674 views Asked by At

I have a csv file which I would like to convert to IOB format so that I can train it using crfsuite. I am using python and I am new to it. Here is part of the data of the csv file

data of the csv file

this is how I want it to be..I think this is the IOB format

When I run the following code on the terminal

$ zcat all-data.txt.gz | ./chunking.py > all-data.crfsuite.txt

Error:

Too few fields (1) for ['w', 'pos', 'y'] ['You']
0

There are 0 answers