Skip to content
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

Question about use of prior lexicon #4

Open
chachijun opened this issue Jul 20, 2022 · 0 comments
Open

Question about use of prior lexicon #4

chachijun opened this issue Jul 20, 2022 · 0 comments

Comments

@chachijun
Copy link

chachijun commented Jul 20, 2022

Hi victor7246,

I found the results of the model with lexicon of 2000 words and the one with lexicon of 1 word are exactly the same.
And I looked at the code,

s = sampleFromCategorical(sentimentDistribution)
prior_sentiment = lexicon_dict.get(w,1)
self.n_vts[w, t, s*prior_sentiment] += 1

Suppose the number of sentiment labels is 2, and s will produce 0 or 1 and prior sentiment will be -1 or 1;
if s is 0, then s*prior_sentiment will always produce 0;
if s is 1, then s*prior_sentiment will be -1 or 1 but n_vts[w,t,-1] is the same as n_vts[w,t,1] right?

I am so confused about this issue.
I will really appreciate if you can help me :)
Thank you!

Kind regards,
Jun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant