nikitakit / self-attentive-parser

High-accuracy NLP parser with models for 11 languages.
https://parser.kitaev.io/
MIT License
858 stars 153 forks source link

Forest output #11

Open freesunshine0316 opened 5 years ago

freesunshine0316 commented 5 years ago

Dear authors,

Is it possible to output a packed-forest instead of just a 1-best tree for each sentence? A relevant paper is written by Liang Huang in this (http://www.aclweb.org/anthology/P08-1067) paper.

Thanks.

nikitakit commented 5 years ago

Would extracting the CKY-style parse charts work for you?

freesunshine0316 commented 5 years ago

Hi @nikitakit ,

Thank you for your response and sorry for the late reply. Is it possible to integrate the forest pruning approach described in Section 4.2 of Huang (2018).

freesunshine0316 commented 5 years ago

Hi @nikitakit

Or I can write the forest pruning code, so making the system be able to extract the CKY-style charts seems sufficient. As the full chart can be very large, it's better to only output k-best for each (i,j) span.