Do Main.py and NaturalLanguageAnalyzer.py
This commit is contained in:
parent
2f9b63866a
commit
8009b2a7c4
7
Main.py
Normal file
7
Main.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from NaturalLanguageAnalyzer import NaturalLanguageAnalyzer
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
text = "Cześć, jak masz na imię?"
|
||||||
|
nla = NaturalLanguageAnalyzer()
|
||||||
|
user_act = nla.process(text)
|
||||||
|
print(user_act)
|
6
NaturalLanguageAnalyzer.py
Normal file
6
NaturalLanguageAnalyzer.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
class NaturalLanguageAnalyzer:
|
||||||
|
def process(self, text):
|
||||||
|
user_act = None
|
||||||
|
if ("imie" in text or "imię" in text) and "?" in text:
|
||||||
|
user_act = "request(firstname)"
|
||||||
|
return user_act
|
Loading…
Reference in New Issue
Block a user