[Enhancement] Improve lex_attrs for Spanish & Portuguese #13900
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.
This PR enhances support for Spanish (es) and Portuguese (pt) in their respective
spacy/langmodules by updating thelex_attrs.pyfiles. Each change is accompanied with regression tests in theirtest_text.pyfiles, respectively.Description
Spanish (es):
Add feminine & apocopation ordinals
Add abbreviation (e.g., 1.º) and plural rule for ordinals in
like_numfunctionRefactor
test_issue3803to follow spaCy code conventions by using fixturesAdd regression test
test_es_lex_attrs_like_numberPortuguese (pt):
Add number variations (i.e., uma, duas)
Fix typo "seicentos" -> "seiscentos"
Add gender rules to the hundreds [200-900]
Add feminine ordinals
Add plural rule for ordinals in
like_numAdd tests
test_pt_lex_attrs_like_numberandtest_pt_lex_attrs_like_number_for_ordinalto more or less maintain language coverageAdditional:
./github/contributorsLast bits:
Types of change
My PR covers an enhancement to the existing code.
Checklist