Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
TDD: edit extract_labels_situation_avalancheuse method: test passes
Browse files Browse the repository at this point in the history
  • Loading branch information
amelie-rondot committed May 2, 2023
1 parent f7dd3cf commit afabab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bera/utils/bulletin.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def extract_labels_situation_avalancheuse(raw_text: str) -> set[Label]:
labels.add(Label.NEIGE_FRAICHE)
if "neige humide" in raw_text.lower() or "neige de printemps" in raw_text.lower():
labels.add(Label.NEIGE_HUMIDE)
if "plaque de fond" in raw_text.lower() or \
not re.match("avalanche[\s-] de glissement", raw_text.lower()) is None:
if "plaque de fond" in raw_text.lower() or "plaques de fond" in raw_text.lower() or\
not re.match("avalanches? de glissement", raw_text.lower()) is None:
labels.add(Label.AVALANCHE_GLISSEMENT)
return labels

Expand Down

0 comments on commit afabab0

Please sign in to comment.