Code Monkey home page Code Monkey logo

Comments (5)

yoonkim avatar yoonkim commented on July 22, 2024

Great question! In our PCFG we have a separate rule for S-->NT where NT is the set of nonterminals (section 2 of the paper), so a full tree in our grammar looks like something like slide 15 of http://www.people.fas.harvard.edu/~yoonkim/data/comp-pcfg-slides.pdf. This is slightly different from the usual CNF for PCFGs.

In practice however, we found that the distribution for S-->NT becomes a one-hot distribution after training, so we can essentially replace one of the nonterminals (which has all the mass) with S. (So in some of my slides I don't show the explicit S-->NT transformation).

Note that we do not count the root-level constituent for evaluation (per convention).

Hope this helps!

from compound-pcfg.

adamxyang avatar adamxyang commented on July 22, 2024

Thanks for the quick reply and the explanation!

from compound-pcfg.

adamxyang avatar adamxyang commented on July 22, 2024

Btw, are there any particular reasons for using S->NT as root rules instead of the usual CNF form S->NT,NT?

from compound-pcfg.

yoonkim avatar yoonkim commented on July 22, 2024

Initially I was experimenting with having several latent vectors for a sentence and was hoping to learn disentangled representations through the three types of rules (i.e. S[z_1]->NT, NT[z_2]->NT NT, NT[z_3]->w). But it turned out having one latent vector was sufficient and S[z]->NT always collapsed to a one-hot distribution. I agree though that having S->NT,NT is cleaner.

from compound-pcfg.

adamxyang avatar adamxyang commented on July 22, 2024

I see, thank you!

from compound-pcfg.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.