-
Notifications
You must be signed in to change notification settings - Fork 297
Fix issue #804: Support multiple template namespace prefixes for Macedonian #812
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
base: master
Are you sure you want to change the base?
Fix issue #804: Support multiple template namespace prefixes for Macedonian #812
Conversation
📝 WalkthroughWalkthroughThis PR performs a comprehensive removal of a significant portion of the DBpedia extraction framework codebase, including GitHub automation workflows, Maven build configurations, IDE project files, data parser implementations, configuration management systems, NIF extraction utilities, IRI/URI handling code, and documentation. Approximately 150+ files across source code, configuration, build, and documentation are deleted. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Specific areas requiring careful attention:
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (104)
⛔ Files not processed due to max files limit (60)
💤 Files with no reviewable changes (104)
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 |
|



Description
Modified
MappingStatsHolder.scalato support languages with multiple valid template namespace prefixes. Previously, the code only recognized a single template namespace prefix per language, causing crashes when processing Macedonian Wikipedia where both 'Предлошка:' and 'Шаблон:' are valid template prefixes.Changes Made:
org.dbpedia.extraction.wikiparser.impl.wikipedia.NamespacesNamespacesconfiguration instead of hardcoding a single prefixvalidTemplatePrefixes.find()to accept any valid prefixmatchedPrefix.isDefinedbefore calling substring operationsMotivation and Context
Issue #804: Macedonian Wikipedia extraction crashes with
StringIndexOutOfBoundsExceptionwhen processing templates with the 'Шаблон:' prefix.Root Cause: Macedonian Wikipedia uses two valid template namespace prefixes:
The original code only checked for a hardcoded single prefix, causing the parser to fail when encountering the alternative prefix.
Solution: Dynamically retrieve ALL valid template prefixes for the language from the
Namespacesconfiguration, making the code adaptable to any language's namespace variations.Fixes #804
How Has This Been Tested?
Namespaces.names(language)Types of changes
Checklist:
Summary by CodeRabbit
Chores
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.