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

Add ability to set language detector Seed #1513

Open
takenspc opened this issue Jan 4, 2023 · 0 comments · May be fixed by #1519
Open

Add ability to set language detector Seed #1513

takenspc opened this issue Jan 4, 2023 · 0 comments · May be fixed by #1519

Comments

@takenspc
Copy link
Contributor

takenspc commented Jan 4, 2023

Is your feature request related to a problem? Please describe.
The language detector produces different results from same input because it uses random number.

https://github.com/validator/language-detection/blob/575f9b99a978a0594dfbebc47663f9dd2db42363/src/com/cybozu/labs/langdetect/Detector.java#L239-L246

Using random number is probably good practice in general though we need reproducible results in some cases.

Describe the solution you'd like
If you don’t mind, we would like to add a new system property to set language detector seed.

Example:

java -Dnu.validator.checker.langDetectionSeed=12345 vnu.jar

Describe alternatives you've considered
Disabling language detector is possible alternatives to make Nu Html Checker more reproducible. Howerver, the language detector catches some type of errors so that we want to continue using language detector.

Additional context
None.

@takenspc takenspc linked a pull request Jan 7, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant