From cd8da4bdcd08290a3fe0af40354703e0be047c74 Mon Sep 17 00:00:00 2001 From: s495724 Date: Mon, 6 May 2024 14:51:18 +0200 Subject: [PATCH] NLG --- src/service/natural_language_generation.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/service/natural_language_generation.py diff --git a/src/service/natural_language_generation.py b/src/service/natural_language_generation.py new file mode 100644 index 0000000..13f7923 --- /dev/null +++ b/src/service/natural_language_generation.py @@ -0,0 +1,10 @@ +class NaturalLanguageGeneration: + def __init__(self, name): + self.name = name + + def respond_to_name_query(self, question): + if "jak masz na imię?" in question.lower(): + return f"Nazywam się {self.name}." + else: + return "Nie rozumiem." +