Code Monkey home page Code Monkey logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
This is be design. We actually generate the first word given START, so the 
first generation is a bigram. This is the way SRILM models things, and 
generally accepted, as far as I know. 

If the model were a 5-gram, then the first word would be generated as a bigram, 
the second as a trigram, and so on. 

Original comment by [email protected] on 20 Mar 2014 at 6:30

  • Changed state: WontFix

from berkeleylm.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Ok - thanks a lot for that info. Few questions on the design

1. Can you let me know why the loop starts from i=1, rather than i=0. 

2. Also why is it i + lm_.getLmOrder() ? Is the endPos non inclusive ? 
E.G if i is 1 and getLmOrder() is 3, startpos and endpos will be 1 and 4. If I 
am looking for tri-grams, I would have thought startpos and endpos should be 1 
and 3.

3. I am loading google books binary in my code and need only trigram log 
probabilities. Going by your explanation of using a bigram for the start of the 
sentence, should I pass 0,1 as the startpos and endpos of the first gram ? And 
then again 0,2 as the startpost and endpos of the next gram? and then follow it 
up by 1,3 ?

WOuld be grateful again for your help on this

Original comment by [email protected] on 21 Mar 2014 at 5:36

from berkeleylm.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
1. The sentence already has start markers, and we don't generate start.

2. endPos is non-inclusive, you're right.

3. I'm confused why you are writing your own code? AWhat exactly is the score 
you want to compute? Why can't you just use ComputeLogProbabilityOfTextStream?

Original comment by [email protected] on 7 Sep 2014 at 7:05

from berkeleylm.

Related Issues (20)

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.