Spaces:
Runtime error
Runtime error
lhzstar
commited on
Commit
•
7fedcd4
1
Parent(s):
98ad652
new commits
Browse files- celebbot.py +1 -1
celebbot.py
CHANGED
@@ -123,7 +123,7 @@ class CelebBot():
|
|
123 |
if token.text.lower() == "she":
|
124 |
transformed_text.append("I")
|
125 |
elif token.text.lower() == "her":
|
126 |
-
if i
|
127 |
transformed_text.append("my")
|
128 |
else:
|
129 |
transformed_text.append("me")
|
|
|
123 |
if token.text.lower() == "she":
|
124 |
transformed_text.append("I")
|
125 |
elif token.text.lower() == "her":
|
126 |
+
if i < len(doc)-2 and doc[i+2].dep_ in ["nsubj", "nsubjpass", "dobj", "appos", "dative", "attr", "amod", "nummod", "compound", "pobj", "pcomp"]:
|
127 |
transformed_text.append("my")
|
128 |
else:
|
129 |
transformed_text.append("me")
|