fix(nlp): add punkt_tab download, fix regex escape, and add QuestionEnhancer unit tests - #679
Rajratna-D wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe changes add an NLTK resource download, update the notation for a sentence-splitting regex, and add tests for ChangesQuestion generation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No new merge-blocking behavior is established by these changes; the PR is ready for normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Link your account with GitcordThanks for opening this PR, @Rajratna-D! To receive Discord notifications and contributor tracking for this organization:
Once linked, Gitcord can notify you about reviews, merges, and more. — Posted by Gitcord |
Summary of Changes
nltk.download('punkt_tab', quiet=True)inbackend/Generator/question_filters.py. In modern NLTK releases, tokenization expectspunkt_tab, which previously resulted in aLookupError: Resource 'punkt_tab' not found.r"..."tore.findall(r".*?[.!\?]", text)inbackend/Generator/main.pyto resolve Python 3.12+SyntaxWarning: invalid escape sequence '\?'.Testing/test_question_filters.pycontaining 11 tests covering:None, single characters, non-string typesTesting
Ran pytest locally: