feat: extraction expressions math + workflow calculatrice paramétrable

- IntentParser: ajout pattern "expression" pour capturer 5+2, 100*3, etc.
- demo_calculator.json: text "${expression}=" avec default "2+2"
  → l'utilisateur peut dire "calcule 5+2" et le paramètre est injecté

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dom
2026-03-14 18:39:56 +01:00
parent 7df01f2642
commit 8f31ba95d3
2 changed files with 104 additions and 0 deletions

View File

@@ -139,6 +139,10 @@ class IntentParser:
r"de\s+([A-Za-z])\s+à\s+([A-Za-z])",
r"(\d+)\s*(?:-|à|to)\s*(\d+)",
],
"expression": [
# Expressions mathématiques : 5+2, 100*3, 12/4, 7-3, 2.5+3.1
r"(\d+(?:[.,]\d+)?\s*[+\-*/x×÷]\s*\d+(?:[.,]\d+)?)",
],
}
def __init__(