i'm creating a blank model and trying to train a model from a dataframe which i'm converting to a list
my dataframe where i have created a training data as needed
| id | tdata |
|----|----------------------------------------------------|
| 1 | ("sample text record",{"entities":[(0,5,"Name")]}), |
| 2 | ("TypeA text record",{"entities":[(0,4,"Name")]}),|
| 3 | ("TypeB text record",{"entities":[(0,4,"Name")]}),|
then i try to prepare my training data using the below code
TRAIN_DATA = df['tdata'].tolist()
which gives me output as below and spaCy complains with ValueError: too many values to unpack (expected 2)
['("sample text record",{"entities":[(0,5,"Name")]}),','("TypeA text record"{"entities":[(0,4,"Name")]}),','("TypeB text record",{"entities":[(0,4,"Name")]}),']
what i would need is below for successful run is without the single quotes for each item in list
[("sample text record",{"entities":[(0,5,"Name")]}),("TypeA text record",{"entities":[0,4,"Name")]}),("TypeB text record",{"entities":[(0,4,"Name")]}),]