Comments (3)
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.
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.
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)
- ArrayIndexOutOfBoundsException while calling getLogProb HOT 8
- Runtime exception: Hash map is full with 100 keys. Should never happen. HOT 16
- What's the log base of NgramLanguageModel.getLogProb() ? HOT 5
- Can I feed this library raw counts instead of text files, and have it compute the Kneser Ney probabilities for me? HOT 1
- ArrayOutOfBoundsException when reading in a large ARPA file. HOT 7
- Are the log probabilities comparable across language models? HOT 4
- Cannot train unigram model with Kneser-Ney HOT 2
- broken link on http://tomato.banatao.berkeley.edu:8080/berkeleylm_binaries/ HOT 1
- StarPos and EndPos for ngram log probability HOT 3
- Getting NAN on last trigram when using google binary HOT 1
- Trying to build a language model on higher-order n-grams. HOT 3
- Frequency Map HOT 1
- Calculating log probability over larger document
- Unknown Values
- Old mvn file
- no start token with LmReaders.readNgramMapFromBinary?
- no license information
- Documentation, usage, etc.
- creating and reading arpa files is 1. locale dependant 2. seems to have problems with multiple tabs in the text 3. seems to have some problem with the lack of newlines HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from berkeleylm.