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

No way to change default n-gram size from 3 to something else #102

Open
lngdet opened this issue Oct 10, 2019 · 1 comment
Open

No way to change default n-gram size from 3 to something else #102

lngdet opened this issue Oct 10, 2019 · 1 comment

Comments

@lngdet
Copy link

lngdet commented Oct 10, 2019

n-gram size seems fixed at 3, how can it be changed to a user-specified value?

@james-s-w-clark
Copy link

Class NgramExtractors has

    private static final NgramExtractor STANDARD = NgramExtractor
            .gramLengths(1, 2, 3)
            .filter(StandardNgramFilter.getInstance())
            .textPadding(' ');

so you should be able to make your own like this.
I think bundled models only have 1-grams, 2-grams, and 3-grams.

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

2 participants