Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hit-Girl
code
Commits
f482d928
Commit
f482d928
authored
Feb 05, 2022
by
Jerome Wuerf
Browse files
Merge branch 'refactor-structural-distance' into 'main'
Refactor structural distance See merge request
!17
parents
c8372371
9715c4c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/src/prototype/retrieval/reranking.py
View file @
f482d928
...
...
@@ -139,10 +139,10 @@ class StructuralDistanceReranking(Reranking):
for
topic_nrb
,
premises_pre_conclusions
in
tqdm
(
self
.
premises_per_conclusions_per_topics
.
items
()):
for
premises_per_conclusion
in
tqdm
(
premises_pre_conclusions
.
values
()):
conclusion_text
=
premises_per_conclusion
[
'conclusion'
][
'_source'
][
'sentence_text'
]
conclusion
=
premises_per_conclusion
[
'conclusion'
]
conclusion_text
=
conclusion
[
'_source'
][
'sentence_text'
]
conclusion
[
self
.
reranking_key
]
=
structural_distance
(
conclusion
[
'_source'
][
'sentence
_text
'
]
,
conclusion_text
,
self
.
topics
.
loc
[
topic_nrb
][
'topic'
])
for
premise
in
premises_per_conclusion
[
'premises'
]:
...
...
Write
Preview
Supports
Markdown
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