From 728e04523dfe545cd4d8c6d831f951f138458bd0 Mon Sep 17 00:00:00 2001 From: merspieler Date: Thu, 15 Mar 2018 14:13:17 +0100 Subject: [PATCH] Added more substitutions Signed-off-by: merspieler --- __init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 6cf8a69..8786644 100644 --- a/__init__.py +++ b/__init__.py @@ -286,8 +286,7 @@ class FlightGearCopilotSkill(MycroftSkill): item_value = self.expand_adverbations(item_value) item_value = re.sub('/', '|', item_value) item_value = re.sub('_', '', item_value) - item_value = re.sub('\(', ' ', item_value) - item_value = re.sub('\)', ' ', item_value) + item_value = re.sub('\(.*\)', ' ', item_value) response = self.expand_adverbations(response) match = re.search(item_value, response, re.I) @@ -812,6 +811,9 @@ class FlightGearCopilotSkill(MycroftSkill): text = re.sub("GND ", "ground", text, flags=re.I) text = re.sub("APPR ", "approach", text, flags=re.I) text = re.sub("FREQ ", "frequency", text, flags=re.I) + text = re.sub("STD ", "standart", text, flags=re.I) + text = re.sub("AFT ", "after", text, flags=re.I) + text = re.sub("FWD ", "foreward", text, flags=re.I) return text # exit routine to properly close the tn con