fhamborg / Giveme5W1H

Extraction of the journalistic five W and one H questions (5W1H) from news articles: who did what, when, where, why, and how?
Apache License 2.0
507 stars 88 forks source link

AttributeError: 'list' object has no attribute 'values' #42

Closed Mintellect310 closed 4 years ago

Mintellect310 commented 4 years ago

I've installed the proper requireent files and am able to open a server and run the code aswell. But every time I run the script, it shows an error "AttributeError: 'list' object has no attribute 'values' " from the action_extractor.py line 104 i.e) doc_coref.values(). script: https://github.com/fhamborg/Giveme5W1H/blob/master/Giveme5W1H/examples/extracting/parse_single_from_code.py

action_extractor.py: https://github.com/fhamborg/Giveme5W1H/blob/master/Giveme5W1H/extractor/extractors/action_extractor.py

error from command line (kubuntu 19.10): No extractors passed: initializing default configuration. No combinedScorers passed: initializing default configuration. edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException: Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl Exception in thread Thread-3: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/home/maheeth/Desktop/WP4/Giveme5W1H/Giveme5W1H/extractor/extractor.py", line 20, in run extractor.process(document) File "/home/maheeth/Desktop/WP4/Giveme5W1H/Giveme5W1H/extractor/extractors/abs_extractor.py", line 41, in process self._evaluate_candidates(document) File "/home/maheeth/Desktop/WP4/Giveme5W1H/Giveme5W1H/extractor/extractors/action_extractor.py", line 104, in _evaluate_candidates if any(doc_coref.values()): AttributeError: 'list' object has no attribute 'values'

Same probem comes while running in RestFul API