Remove fragments from Yoruba stop words (#14036) - #14037
Open
adedejimakinde wants to merge 1 commit into
Open
adedejimakinde wants to merge 1 commit into
adedejimakinde wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Description
Fixes #14036.
The Yorùbá stop word list contained 24 entries that are not standalone words: three bare combining marks (U+0300, U+0301, U+0323), fourteen isolated consonants (b, d, f, g, j, k, l, p, r, s, t, w, y, ṣ), and seven vowels that only occur inside words (à, e, è, i, ì, u, ù). These look like the result of splitting text that wasn't Unicode normalised.
This PR removes them, taking the list from 91 to 67 entries. Single-character entries that are real Yorùbá words are kept, for example ó (he/she/it), ń (progressive marker), ò (negation), and the object pronouns á, é, í, ú.
It also adds
spacy/tests/lang/yo/test_stop_words.py, which checks that every stop word is NFC normalised, that no entry starts with a combining mark, that the removed fragments stay out, and that real single-character words stay in.I ran the new tests against spaCy 3.8.16 before and after the change: 25 failed and 5 passed with the original list, and all 30 passed with the fixed list.
Types of change
Bug fix (language data)
Checklist