Skip to content

Commit

Permalink
Update pyai.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellShibilski-Unkel committed Mar 21, 2024
1 parent 1f89351 commit 2721f7b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion pyai.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ def __init__(self, text: str):
self._present = ["is", "has"]
self._future = ["will", "shall"]

def setTokensTo(self, letters: bool, *words: bool, **sentences: bool):
self.tokens = []

if letters:
tokens = iter(self.sentences)
for t in tokens:
self.tokens.append(t)
elif words:
for t in self.words:
self.tokens.append(t)
elif sentences:
for t in self.sentences:
self.tokens.append(t)
else:
self.tokens.append("ERROR")

def getTense(self):
self.past = False
self.present = False
Expand All @@ -54,4 +70,7 @@ def getWords(self):
return self.words

def getSentences(self):
return self.sentences
return self.sentences

def getTokens(self):
return self.tokens

0 comments on commit 2721f7b

Please sign in to comment.