-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(#276): loading the model during compilation #303
Conversation
I'm not sure if the downloaded file will end up in the jar being compiled, since so far I don't understand at all where and where our program builds. |
@yegor256 Please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marat-Tim it would be nice to have a test that would check if the file is downloaded. Check this
@Marat-Tim also, would be great if you can name your pull request better and provide a description for it, check this one please: https://www.yegor256.com/2024/12/15/open-source-beginner-advice.html |
hmm, as if testing LtTestNotVerb would test for the presence of a file |
Assertions.assertDoesNotThrow( | ||
() -> { | ||
final InputStream input = new ResourceOf("en-pos-perceptron.bin").stream(); | ||
input.readAllBytes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marat-Tim It's not a really good idea to test file presence by reading it. The file may be huge and your OS die. There is a special mechanism and method in Java to check the file presence
@Marat-Tim I think I was wrong, maybe we shouldn't test things like this since your changes didn't break anything in build pipeline. Let's just remove the test, you added and I think we're good to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yegor256 please check
@Marat-Tim thanks! |
In this pull request, I go through the process of getting a model file to analyze words in verbs. It used to be downloaded in runtime. I tried to fix this by downloading it to the app's resources in compile time