You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by "rzo1 (via GitHub)" <gi...@apache.org> on 2026/10/02 04:29:13 UTC
[PR] OPENNLP-1975: Address follow-up review comments from #1314 (opennlp)
rzo1 opened a new pull request, #1351:
URL: https://github.com/apache/opennlp/pull/1351
Follow-up to #1314, which was merged before @mawiesne's review comments were addressed.
## Changes
- **`TokenSampleStream`**
- The checked symbols are now constants; the two chains of `equals` calls are now `SPACED_PUNCTUATION` and `ATTACHING_TO_NEXT` sets.
- Dropped `(!lastToken.equals("(") || !lastToken.equals("{"))`, which is always true. Output is unchanged.
- Javadoc wording: "Tests" is now "Checks".
- `containsLetterOrDigit` is now `static`.
- **`DownloadUtil`**
- A blank checksum file throws `IllegalArgumentException`, and a checksum mismatch throws `IllegalStateException`. Both used to throw `IOException`.
- Javadoc is updated on `verifyChecksum`, `validateModel`, `validateCachedModel`, `existsModel` and both `downloadModel` overloads.
- **`ConlluStream`**: `parseContractionRange` and `extractTextLang` don't use instance state, so they are now `static`.
- **`ConlluStreamTest`**: `sent1.getWordLines()` is extracted into a local and checked for null before indexing. The `parseContractionRange` tests call the static method directly.
## Note for reviewers
`DownloadUtil.downloadModel(...)` is public. Callers that caught `IOException` to handle checksum failures will now get an unchecked exception instead, which shows up through the `*ME(String language)` constructors.
## Tests
`TokenSampleStreamTest`, `DownloadUtilCacheIntegrityTest` and `ConlluStreamTest` pass, and checkstyle is clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opennlp.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OPENNLP-1975: Address follow-up review comments from #1314 (opennlp)
Posted by "mawiesne (via GitHub)" <gi...@apache.org>.
mawiesne merged PR #1351:
URL: https://github.com/apache/opennlp/pull/1351
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opennlp.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org