fix AttributeError: 'list' object has no attribute 'split'
Browse files
model.py
CHANGED
@@ -67,10 +67,11 @@ def model(passage, level):
|
|
67 |
txt = passage
|
68 |
|
69 |
# sentence_cutters = [".", "!", "?"]
|
70 |
-
if ("." in txt) or ("!" in txt) or ("?" in txt):
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
74 |
|
75 |
text_dict = {}
|
76 |
for n in txt:
|
|
|
67 |
txt = passage
|
68 |
|
69 |
# sentence_cutters = [".", "!", "?"]
|
70 |
+
# if ("." in txt) or ("!" in txt) or ("?" in txt):
|
71 |
+
txt = txt.replace("!", ".").replace("?", ".")
|
72 |
+
txt = txt.split(".")
|
73 |
+
# else:
|
74 |
+
# txt = txt
|
75 |
|
76 |
text_dict = {}
|
77 |
for n in txt:
|