Code Monkey home page Code Monkey logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Sorry for taking so long to get back. My first guess is that it has something 
to do with the score for unseen words. Can you verify that running scoring the 
data you generated the LM from (so that there are no unknown words) with both 
SRILM and BerkeleyLM gives similar results? Otherwise, it might be some ugly 
character encoding issues. 

Original comment by [email protected] on 18 Feb 2014 at 12:09

from berkeleylm.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
It is better but still an order of magnitude smaller (in absolute value)
than that of SRILM. My corpus is encoded in UTF-8. Vietnamese text makes
heavy use of accented characters which cannot be represented in ASCII.


$ . ./env.sh

$ java -ea -mx1000m -server -cp berkeleylm.jar
edu.berkeley.nlp.lm.io.MakeKneserNeyArpaFromText 5 segmented.arpa
$SEGMENTED_CORPUS_TRAIN
$ java -ea -mx1000m -server -cp berkeleylm.jar
edu.berkeley.nlp.lm.io.MakeLmBinaryFromArpa segmented.arpa segmented.binary
$ java -ea -mx1000m -server -cp berkeleylm.jar
edu.berkeley.nlp.lm.io.ComputeLogProbabilityOfTextStream segmented.binary
$SEGMENTED_CORPUS_TRAIN
Log probability of text is: *-67358.47160708543*

$ ngram-count -ukndiscount -order 5 -lm segmented.srilm.arpa -text
$SEGMENTED_CORPUS_TRAIN
$ ngram -lm segmented.srilm.arpa -ppl $SEGMENTED_CORPUS_TRAIN
file segmented.train.txt: 68197 sentences, 1.54738e+06 words, 0 OOVs
0 zeroprobs, logprob= *-3.16751e+06* ppl= 91.3297 ppl1= 111.435

Original comment by [email protected] on 18 Feb 2014 at 12:26

from berkeleylm.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Interesting. Full disclosure: I don't have time to do real debugging anymore 
myself, so I think you're largely on your own. SRILM by default does different 
things with modified KN smoothing and computation of discount factors. At one 
point, I made sure they did exactly the same thing for some simplified settings 
of SRILM, but I couldn't tell you what those settings are. 

If I were you, I check very short sentence with very common words. Most of the 
difference between SRILM and BerkeleyLM happens for low-count words, so the 
difference should shrink if that's all that's going on.

Original comment by [email protected] on 18 Feb 2014 at 12:42

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.