Skip to content

Commit 11efb14

Browse files
authored
Merge pull request #208 from American-Institutes-for-Research/HEA-815/miking_animals_regex
Hea 815/miking animals regex
2 parents 92e0fb4 + f244829 commit 11efb14

2 files changed

Lines changed: 55 additions & 4 deletions

File tree

pipelines/assets/livelihood_activity_regexes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
"lactation_days"
327327
],
328328
[
329-
"no. milking animals",
329+
"(?:no\\.|no|number) milking animals",
330330
null,
331331
false,
332332
"milking_animals"
@@ -542,19 +542,19 @@
542542
null
543543
],
544544
[
545-
"{nbr_pattern} (d')?animaux laitiers",
545+
"{nbr_pattern} (?:d')?animaux (?:laitiers|lactants)",
546546
null,
547547
false,
548548
"milking_animals"
549549
],
550550
[
551-
"(?P<season>saison 1): {nbr_pattern} animaux (?:laitiers|lactants)",
551+
"(?P<season>saison (?:1|pluvieuse|hivernage)): {nbr_pattern} (?:d')?animaux (?:laitiers|lactants)",
552552
"MilkProduction",
553553
false,
554554
"milking_animals"
555555
],
556556
[
557-
"(?P<season>saison 2): {nbr_pattern} animaux (?:laitiers|lactants)",
557+
"(?P<season>saison (?:2|seche|sèche)): {nbr_pattern} (?:d')?animaux (?:laitiers|lactants)",
558558
"MilkProduction",
559559
true,
560560
"milking_animals"

pipelines_tests/test_assets/test_livelihood_activity_regexes.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
"no. milking animals": {
1919
"attribute": "milking_animals"
2020
},
21+
"no milking animals": {
22+
"attribute": "milking_animals"
23+
},
24+
"number milking animals": {
25+
"attribute": "milking_animals"
26+
},
2127
"season 1: lactation period (days)": {
2228
"strategy_type": "MilkProduction",
2329
"season": "season 1",
@@ -304,17 +310,62 @@
304310
"nb d'animaux laitiers": {
305311
"attribute": "milking_animals"
306312
},
313+
"nbr d'animaux laitiers": {
314+
"attribute": "milking_animals"
315+
},
316+
"nb animaux laitiers": {
317+
"attribute": "milking_animals"
318+
},
319+
"nbr animaux lactants": {
320+
"attribute": "milking_animals"
321+
},
322+
"nbr d'animaux lactants": {
323+
"attribute": "milking_animals"
324+
},
307325
"saison 1: nb animaux laitiers": {
308326
"strategy_type": "MilkProduction",
309327
"season": "saison 1",
310328
"attribute": "milking_animals"
311329
},
330+
"saison 1: nbr d'animaux lactants": {
331+
"strategy_type": "MilkProduction",
332+
"season": "saison 1",
333+
"attribute": "milking_animals"
334+
},
335+
"saison pluvieuse: nb animaux laitiers": {
336+
"strategy_type": "MilkProduction",
337+
"season": "saison pluvieuse",
338+
"attribute": "milking_animals"
339+
},
340+
"saison hivernage: nbr animaux lactants": {
341+
"strategy_type": "MilkProduction",
342+
"season": "saison hivernage",
343+
"attribute": "milking_animals"
344+
},
312345
"saison 2: nb animaux laitiers": {
313346
"strategy_type": "MilkProduction",
314347
"is_start": true,
315348
"season": "saison 2",
316349
"attribute": "milking_animals"
317350
},
351+
"saison 2: nbr d'animaux lactants": {
352+
"strategy_type": "MilkProduction",
353+
"is_start": true,
354+
"season": "saison 2",
355+
"attribute": "milking_animals"
356+
},
357+
"saison seche: nb animaux laitiers": {
358+
"strategy_type": "MilkProduction",
359+
"is_start": true,
360+
"season": "saison seche",
361+
"attribute": "milking_animals"
362+
},
363+
"saison sèche: nbr animaux lactants": {
364+
"strategy_type": "MilkProduction",
365+
"is_start": true,
366+
"season": "saison sèche",
367+
"attribute": "milking_animals"
368+
},
318369
"période de lactation (jours)": {
319370
"attribute": "lactation_days"
320371
},

0 commit comments

Comments
 (0)