Skip to content

feat: Make nltk optional#770

Open
benglewis wants to merge 1 commit intoHumanSignal:masterfrom
benglewis:make-nltk-optional
Open

feat: Make nltk optional#770
benglewis wants to merge 1 commit intoHumanSignal:masterfrom
benglewis:make-nltk-optional

Conversation

@benglewis
Copy link
Copy Markdown
Contributor

Fixes #769

@benglewis benglewis changed the title Make nltk optional feat: Make nltk optional Feb 23, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c384a7df09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

jsonschema = ">=4.23.0"
lxml = ">=4.2.5"
nltk = "^3.9.1"
nltk = { version = "^3.9.1", optional = true }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep nltk available in the default test install

Making nltk optional here means a plain poetry install no longer guarantees it, but the test workflow still installs dependencies without extras and runs tests/custom/converter/test_export_conll.py; those tests call create_tokens_and_tags(), which now raises the new ImportError when nltk is missing. In a clean CI/dev environment this turns the default pytest run into a failure unless the conll extra is explicitly installed or CONLL tests are gated.

Useful? React with 👍 / 👎.

@wilsonwu
Copy link
Copy Markdown

wilsonwu commented Mar 4, 2026

I think upgrade to 3.9.3 is OK to fix this CVE.

@benglewis
Copy link
Copy Markdown
Contributor Author

@wilsonwu Unfortunately, that won't fix it anymore:

nltk | 3.9.2 | CVE-2026-33236 | | NLTK has a Downloader Path Traversal Vulnerability (AFO) - Arbitrary File Overwrite
nltk | 3.9.2 | CVE-2026-33230 | | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in nltk
nltk | 3.9.2 | CVE-2026-33231 | | Unauthenticated remote shutdown in nltk.app.wordnet_app
nltk | 3.9.2 | GHSA-rf74-v2fm-23pw | | Natural Language Toolkit (NLTK) has unbounded recursion in JSONTaggedDecoder.decode_obj() may cause DoS

I would really appreciate if there was some way to get this PR merged? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move nltk to an optional dependency

2 participants