python 2.7 - insert data in sqlite3 when array could be of different lengths -


coming off nltk ner problem, have persons , organizations, need store in sqlite3 db. obtained wisdom need create separate tables hold these sets. how can create table when len(persons) vary each id. can zero. normal use of: insert table_name values (?),(t[0]) return fail.

thanks cl.'s comment, figured out best way think rows in two-column table, first column id int, , second column contains person_names. way, there no issue varying lengths of persons list. of course, link main table persons table, id field has reference (foreign keys) story_id (main table).


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -