Skip to content

A suggestion on the JBLEU class #11

@magician-david

Description

@magician-david

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions