mercredi 20 février 2019

How to make corpus with pandas dataframe (with if conditions)?

enter image description here

I hope to make a corpus with pairs of parent and children.

Column 'parent', having a value of "root", is the top node at the dialogue dataset, and it contiues to generate the children node until the children node has the value of "tail".

I want to make a corpus such as: dialogue#1 : [body_parent, body_children1, body_children2, ... , body_children_tail ] dialogue#2 : [body_parent, body_children1, body_children2, ... , body_children_tail ] dialogue#3 : [body_parent, body_children_tail ] dialogue#3 : [body_parent, body_children1, body_children_tail ] ...

Could you help me to make a corpus with if-statement and for-loop conditions. This task is too hard for me. Thanks alot.

Blockquote

Aucun commentaire:

Enregistrer un commentaire