TypeError Traceback (most recent call last)
in ()
1 import negation_detection
2 sentence = "ZZZZ reported no recent periods of low mood, discussed how in the past she made many suicide attempts"
----> 3 negation_detection.predict(sentence, 'suicide')
1 frames
/content/negation-detection/negation_detection.py in predict(sentence, keyword, asBoolean)
433 return processReturnResult(rs, asBoolean)
434
--> 435 def predict(sentence, keyword, asBoolean=True):
436 sentence = preprocess(sentence, keyword)
437 tokens = findSentencePTreeToken(sentence, keyword)
/content/negation-detection/negation_detection.py in preprocess(sentence, keyword)
147 for s in tmp:
148 import ipdb; ipdb.set_trace()
--> 149 rs = proc.parse_doc(s)
150 for e in rs['sentences']:
151 newS = ""
TypeError: 'NoneType' object is not subscriptable