Update jruby to 9.4.12.1#1293
Merged
Merged
Conversation
…he new jruby version
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates JRuby to 9.4.12.1 and bumps the pragmatic segmenter version to 0.3.24 to address a regression introduced in the previous update. Key changes include updating version numbers, refactoring method calls from instance calls to the new Rule.apply class method across multiple files, and adjusting text initialization from Text.new(text) to text.dup.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| grobid-home/sentence-segmentation/pragmatic_segmenter/version.rb | Bumped version from "0.3.22" to "0.3.24". |
| grobid-home/sentence-segmentation/pragmatic_segmenter/types.rb | Refactored rule application to use the new Rule.apply class method. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/punctuation_replacer.rb | Updated rule calls to use Rule.apply for both @text and local variables. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/processor.rb | Replaced instance .apply calls with Rule.apply for consistency. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/list.rb | Changed Text instantiation to text duplications and updated rule calls accordingly. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/languages/* | Standardized rule application for various language-specific processors. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/cleaner.rb | Updated text initialization and switched to Rule.apply throughout. |
| grobid-home/sentence-segmentation/pragmatic_segmenter/abbreviation_replacer.rb | Applied similar changes to text handling and rule application. |
Comments suppressed due to low confidence (2)
grobid-home/sentence-segmentation/pragmatic_segmenter/languages/common/numbers.rb:50
- Ensure the updated regex pattern still correctly matches all intended numbered references; consider adding specific test cases to cover potential edge cases.
NUMBERED_REFERENCE_REGEX = /(?<=[^\d\s])(\.|∯)((\[(\d{1,3},?\s?-?\s?)?\b\d{1,3}\])+|((\d{1,3}\s?){0,3}\d{1,3}))(\s)(?=[A-Z])/
grobid-home/sentence-segmentation/pragmatic_segmenter/list.rb:51
- Verify that replacing 'Text.new(text)' with 'text.dup' preserves any specialized behavior provided by the Text class and does not introduce unwanted side effects.
@text = text.dup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the regression introduced by updating to jruby 9.4.12.0 (in #1261):
More tests are required, ideally a few thousand PDFs. Before testing, you have to switch to the pragmatic segmenter in the configuration: