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

A suggestion on the JBLEU class #11

Open
magician-david opened this issue Dec 3, 2015 · 0 comments
Open

A suggestion on the JBLEU class #11

magician-david opened this issue Dec 3, 2015 · 0 comments

Comments

@magician-david
Copy link

The parameter N in the class JBLEU is fixed to 4.

    private static final int N = 4;

Why don't we get the value of N from the constuction like this?

    private static int N;
    public JBLEU(int n_gram) {
        N = n_gram;
    }
    public JBLEU(int n_gram, int verbosity) {
        N = n_gram;
        this.verbosity = verbosity;
    }

In function:

public double score(int[] suffStats, double[] allResults),

     double ngramOrderWeight = 0.25;

should be

     double ngramOrderWeight = 1.0 / N;

What do you think?

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