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/possible bug in casing #11

Open
bunny-therapist opened this issue Oct 28, 2024 · 1 comment
Open

Question/possible bug in casing #11

bunny-therapist opened this issue Oct 28, 2024 · 1 comment

Comments

@bunny-therapist
Copy link

I don't know enough to say what is right or wrong here, but this crate is here doing

cand.casing /= 1.0 + cand.tf.ln_1p();

but the same computation in the LIAAD implementation of yake reads:

self.WCase = max(self.tf_a, self.tf_n) / (1. + math.log(self.tf))

(WCase is what we call "casing", tf_n appears to be what we call tf_u, even though the way it is computed differs.)

In other words, we have 1+ln(1+tf) in the denominator but LIAAD has 1+ln(tf)
We differ by a +1 in the logarithm since we are using ln_1p instead of ln.

Is this intentional? Is this correct?

@bunny-therapist
Copy link
Author

Yeah, this is definitely a bug. Fixing it brings a lot of examples closer to LIAAD/yake.

@xamgore

xamgore added a commit to xamgore/yake-rust that referenced this issue Oct 29, 2024
xamgore pushed a commit to xamgore/yake-rust that referenced this issue Oct 29, 2024
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