XuezheMax / NeuroNLP2

Deep neural models for core NLP tasks (Pytorch version)
GNU General Public License v3.0
441 stars 89 forks source link

Interpretation of code variables #42

Closed wjinfeng closed 4 years ago

wjinfeng commented 4 years ago

Thank you for your open source work. Could you please explain the parsing method : left2right, deep first, shallow first, inside out in code of , looking forward to your reply

XuezheMax commented 4 years ago

These are the options for selecting the order of the children of a head word in the stack-pointer parser. The stack-pointer parser, at each step, selects a child for the current head word. But it raises a question for head words that have multiple children: what is the order of these children?

For left2right, these children are ordered from left-to-right, i.e. selecting the left-most word first. For inside-out, the child that closest to the head word is selected first.

In practice, inside-out works best. So we set inside-out as our default option.

wjinfeng commented 4 years ago

Thank you very much for your reply, it helped me a lot.