-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another issue with NgramModel.prob() #388
Comments
This looks to me like more of an error in SimpleGoodTuringProbDist than NgramModel itself (granted there are issues abound with NgramModel right now). It may also have something to do with the fact that NgramModel.prob expects different arguments than you're providing. It should be |
@copper-head would you please confirm if this issue is current? |
@stevenbird seeing as the interfaces in the model package are drastically different now, this is no longer relevant. I'd close it. |
@stevenbird @alvations we should close this :) |
Should be outdated given the new Ngram model module now #2077 =) |
Maybe this is related to Issue #380 and issue #367 .
When I call this function twice on the same word and context, the first time I get a probability value, but the second time I get an error.
corpus = ['one','fish','two','fish']
model = NgramModel(2,corpus)
model.prob('fish','one')
which returns the value 1.0. But then when I immediately call model.prob again on the same bigram, I get an attribute error "'SimpleGoodTuringProbDist' object has no attribute '_intercept'"
The text was updated successfully, but these errors were encountered: