Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
texta
texta-mlp-python
Commits
9265e5b6
Commit
9265e5b6
authored
Sep 28, 2021
by
Raul Sirel
Browse files
process docs sentence fix
parent
43e67721
Pipeline
#6548
passed with stage
in 4 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
texta_mlp/mlp.py
View file @
9265e5b6
...
...
@@ -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"
,
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment