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 23, 2024
1 parent 0763fe5 commit fb261bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyai.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def RNN(w, u, b, x):

class NLP:
def __init__(self, text: str):
self.text = text
self.sentences = text.split(".")
self.words = text.split(" ")
self._past = ["was", "had", "did"]
Expand All @@ -38,7 +39,7 @@ def setTokensTo(self, letters: bool, *words: bool, **sentences: bool):
self.tokens = []

if letters:
tokens = iter(self.sentences)
tokens = iter(self.text)
for t in tokens:
self.tokens.append(t)
elif words:
Expand Down

0 comments on commit fb261bf

Please sign in to comment.