dlwh / epic

**Archived** Epic is a high performance statistical parser written in Scala, along with a framework for building complex structured prediction models.
http://scalanlp.org/
Apache License 2.0
469 stars 82 forks source link

"Parsing" with gold segmentation #47

Open jodaiber opened 8 years ago

jodaiber commented 8 years ago

Hi @dlwh,

first off, thanks for making Epic available, it's a great tool!

I have a "parsing" problem where I would like to restrict the search space to a fully segmented binarized tree and would like to use the neural parser to only do the labelling for me (the trees come from a customized treebank that I pass to epic for training). I have been trying to do this via constraints (using GoldConstraintsFactory) in NeuralParserTrainer but so far without success. Is there any established/recommended way for using "gold spans" and only letting Epic do the labelling?

Jo

dlwh commented 8 years ago

A question I can answer in the affirmative!

Look at SentimentTreebankPipeline.scala which uses the Sentiment Treebank for sentiment classification. That assumes a fixed tree structure, as well.

It's not the best documented, but it will probably get you very close to what you want.

jodaiber commented 8 years ago

That's perfect, thank you, @dlwh!