Commit 9265e5b6 authored by Raul Sirel's avatar Raul Sirel
Browse files

process docs sentence fix

parent 43e67721
Pipeline #6548 passed with stage
in 4 minutes and 31 seconds
......@@ -383,6 +383,9 @@ class MLP:
# document class.
self.__apply_analyzer(doc, analyzer)
if "sentences" in analyzers:
doc.fact_spans_to_sent()
result = doc.document_to_json(use_default_doc_path=False)
new_facts = result.pop("texta_facts", [])
existing_facts = document.get("texta_facts", [])
......@@ -390,9 +393,6 @@ class MLP:
result["texta_facts"] = unique_facts
document = result
#if "sentences" in analyzers:
# document.fact_spans_to_sent()
if document:
# Add in texta_facts even if nothing was done due to missing values.
facts = document.get("texta_facts", [])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment