-
-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: parsing of dots in packagins / recycling instructions (#7948)
* fix: parsing of dots in packagins / recycling instructions + better handling of commas
- Loading branch information
1 parent
6062126
commit 1b2e690
Showing
6 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
20 changes: 20 additions & 0 deletions
20
tests/unit/expected_test_results/packaging/fr-comma-inside-a-number.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"lc" : "fr", | ||
"misc_tags" : [ | ||
"en:packagings-not-complete", | ||
"en:packagings-not-empty-but-not-complete", | ||
"en:packagings-not-empty" | ||
], | ||
"packaging_text" : "6 bouteilles en plastique transparent PET de 1,5 L à recycler", | ||
"packagings" : [ | ||
{ | ||
"material" : "en:pet-polyethylene-terephthalate", | ||
"number_of_units" : 6, | ||
"quantity_per_unit" : "1,5 l", | ||
"quantity_per_unit_unit" : "l", | ||
"quantity_per_unit_value" : 1.5, | ||
"recycling" : "en:recycle", | ||
"shape" : "en:bottle" | ||
} | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/unit/expected_test_results/packaging/fr-comma-without-space.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"lc" : "fr", | ||
"misc_tags" : [ | ||
"en:packagings-not-complete", | ||
"en:packagings-not-empty-but-not-complete", | ||
"en:packagings-not-empty" | ||
], | ||
"packaging_text" : "1 boîte en métal,4 bouteilles (plastique).", | ||
"packagings" : [ | ||
{ | ||
"material" : "en:metal", | ||
"number_of_units" : 1, | ||
"shape" : "en:box" | ||
}, | ||
{ | ||
"material" : "en:plastic", | ||
"number_of_units" : 4, | ||
"shape" : "en:bottle" | ||
} | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/unit/expected_test_results/packaging/fr-dot-to-separate-components.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"lc" : "fr", | ||
"misc_tags" : [ | ||
"en:packagings-not-complete", | ||
"en:packagings-not-empty-but-not-complete", | ||
"en:packagings-not-empty" | ||
], | ||
"packaging_text" : "Film plastique à jeter. Étui carton à recycler.", | ||
"packagings" : [ | ||
{ | ||
"material" : "en:plastic", | ||
"recycling" : "en:discard", | ||
"shape" : "en:film" | ||
}, | ||
{ | ||
"material" : "en:cardboard", | ||
"recycling" : "en:recycle", | ||
"shape" : "en:sleeve" | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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