JuliaText / TextAnalysis.jl

Julia package for text analysis
Other
374 stars 96 forks source link

bug fix in get_sentiment function #206

Closed tejasvaidhyadev closed 4 years ago

tejasvaidhyadev commented 4 years ago

As mentioned #205 and #187 Bug fixed in sentiment function In file sentiment_weights we are having having 32×5000 matrices with index-1 is default pad token embedding But here in src/sentiment.jl if ele in keys(rwi) && rwi[ele] <= ( size(weight[:embedding_1]["embedding_1"]["embeddings:0"])[2] ) # there are only 5000 unique embeddings - we are allowing 5000 unique embedding excluding padding which implies 5001 unique embedding but we have only 32×5000 weight. I am not sure about training process may be we are training on only first 5000 element with padding token then replacing above line will work.

tejasvaidhyadev commented 4 years ago

@aviks you can review the given PR