Skip to content

Commit 4fff4bf

Browse files
authored
Merge pull request #242 from American-Institutes-for-Research/HEA-809/add_regex_for_men_women_boys_girls
Better regex for fishing - see HEA-809
2 parents 05f2e2a + e2e7f5b commit 4fff4bf

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

pipelines/assets/livelihood_activity_regexes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"people_per_household"
9393
],
9494
[
95-
"{product_pattern}{separator_pattern} {age_gender_pattern} ?\\(?{unit_of_measure_pattern}(?: collectés?|gathered)?\\)?",
95+
"(?:fish|poisson)?{separator_pattern}{product_pattern}{separator_pattern} {age_gender_pattern} ?\\(?{unit_of_measure_pattern}(?: collectés?|gathered)?\\)?",
9696
null,
9797
true,
9898
"quantity_produced"
@@ -806,7 +806,7 @@
806806
"quantity_produced"
807807
],
808808
[
809-
"(?:fish|fish \\(?dry\\)?|fish \\(?fresh\\)?){separator_pattern} {product_pattern}{separator_pattern} \\(?{unit_of_measure_pattern} gathered\\)?",
809+
"(?:fish|fish \\(?dry\\)?|fish \\(?fresh\\)?|poisson){separator_pattern} {product_pattern}{separator_pattern} \\(?{unit_of_measure_pattern} (?:gathered|collectés)\\)?",
810810
null,
811811
true,
812812
"quantity_produced"

pipelines_tests/test_assets/test_livelihood_activity_regexes.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,18 @@
10321032
"unit_of_measure_id": "kg",
10331033
"attribute": "quantity_produced"
10341034
},
1035+
"poisson : poisson 4 (kg collectés)" : {
1036+
"is_start": true,
1037+
"product_id": "poisson 4",
1038+
"unit_of_measure_id": "kg",
1039+
"attribute": "quantity_produced"
1040+
},
1041+
"fish : fish 4 (kg gathered)": {
1042+
"is_start": true,
1043+
"product_id": "fish 4",
1044+
"unit_of_measure_id": "kg",
1045+
"attribute": "quantity_produced"
1046+
},
10351047
"petit commerce: nbre de personnes par mènage": {
10361048
"is_start": true,
10371049
"product_id": "petit commerce",
@@ -1087,9 +1099,9 @@
10871099
"product_id": "threshing, harvesting",
10881100
"household_labor_provider": "women"
10891101
},
1090-
"poisson/peche homme (kg collectés)": {
1102+
"poisson : peche homme (kg collectés)": {
10911103
"is_start": true,
1092-
"product_id": "poisson/peche",
1104+
"product_id": "peche",
10931105
"household_labor_provider": "men",
10941106
"unit_of_measure_id": "kg",
10951107
"attribute": "quantity_produced"

0 commit comments

Comments
 (0)