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

Negative or Zero YAKE score #17

Open
justachetan opened this issue Aug 19, 2019 · 3 comments
Open

Negative or Zero YAKE score #17

justachetan opened this issue Aug 19, 2019 · 3 comments

Comments

@justachetan
Copy link

What does a YAKE score that is negative or zero imply?

@BeHappyForMe
Copy link

I also have this doubt

@juhoinkinen
Copy link

I think at least negative scores should not result? It seems that the keywords given a negative score are (correctly) highly relevant to the input text (in line with smaller-is-more-relevant ordering of YAKE results), but the negative values can overshoot greatly.

For example, for some Finnish text I'm getting the following:

$ yake -i textfile.txt -n 4 -l fi -v
keyword                                                           score
---------------------------------------------------------  ------------
morrow’n neljä eri sitoutumisen                            -459.937
taulukko                                                      0.0130214
lastensuojelun                                                0.013251
lastensuojelun sosiaalityöntekijöiden                         0.0137784
morrow’n sitoutumisen ulottuvuudet lastensuojelun             0.0174472
sitoutuminen                                                  0.0178739
sosiaalityöntekijöiden työhön sitoutuminen morrow’n           0.0179757
lastensuojelun sosiaalityöntekijöiden työhön                  0.0183498
työhön sitoutumisen                                           0.0186637
lastensuojelun sosiaalityöntekijöiden työhön sitoutuminen     0.022034

(The textfile.txt is crafted to give such an extreme value, on "real" texts I've encountered values from -38 to -0.7.)

One short text that gives a keyword with negative score (actually, as you see the text is taken from a YAKE output):

$ yake -ti '\
morrow’n neljä eri sitoutumisen -12.5494 \
morrow’n sitoutumisen ulottuvuudet lastensuojelun sosiaalityöntekijöiden lastensuojelun sosiaalityön 0.00730972 \
morrow’n sitoutumisen ulottuvuudet lastensuojelun sosiaalityöntekijöiden lastensuojelun 0.00732787'  \
-n 4 -l fi -v
keyword                                                                   score
-----------------------------------------------------------------  ------------
morrow’n neljä eri sitoutumisen                                    -0.827233
morrow’n sitoutumisen ulottuvuudet lastensuojelun                   0.000136636
sitoutumisen ulottuvuudet lastensuojelun sosiaalityöntekijöiden     0.000161529
ulottuvuudet lastensuojelun sosiaalityöntekijöiden lastensuojelun   0.000182362
lastensuojelun sosiaalityöntekijöiden lastensuojelun sosiaalityön   0.0003191
morrow’n sitoutumisen ulottuvuudet                                  0.000812311
ulottuvuudet lastensuojelun sosiaalityöntekijöiden                  0.00108006
sitoutumisen ulottuvuudet lastensuojelun                            0.00137194
lastensuojelun sosiaalityöntekijöiden lastensuojelun                0.0015469
sosiaalityöntekijöiden lastensuojelun sosiaalityön                  0.00189256

I've seen negative scores only with max_ngram_size >= 4. The negative scores can be a bit problematic when the keywords and scores are used in other programs.

@markdimi
Copy link

Is there some more input about this? How can zero or negative score be interpreted?

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

4 participants