捕捉ie中抛出的错误
This commit is contained in:
@@ -40,7 +40,12 @@ def information_extraction(ie, phrecs):
|
|||||||
doc_phrecs.append(phrec)
|
doc_phrecs.append(phrec)
|
||||||
if not docs:
|
if not docs:
|
||||||
return result
|
return result
|
||||||
ie_results = ie(docs)
|
|
||||||
|
try:
|
||||||
|
ie_results = ie(docs)
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(e)
|
||||||
|
return result
|
||||||
|
|
||||||
now = get_default_datetime()
|
now = get_default_datetime()
|
||||||
for i in range(len(ie_results)):
|
for i in range(len(ie_results)):
|
||||||
|
|||||||
Reference in New Issue
Block a user