Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Merge requests
!179
Something went wrong on our end
add space instead of \n in entities
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add space instead of \n in entities
replace-by-space
into
main
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Thibault Lavigne
requested to merge
replace-by-space
into
main
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
Replace \n in " " at the end of the last entity of the lign.
0
0
Merge request reports
Viewing commit
4936e152
Prev
Next
Show latest version
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4936e152
forgot to run pre-commit
· 4936e152
Marie Generali
authored
1 year ago
dan/predict/prediction.py
+
1
−
1
Options
@@ -353,7 +353,7 @@ def run(
result
[
"
confidences
"
][
"
by ner token
"
]
=
[
{
"
text
"
:
f
"
{
text
[
current
:
next_token
]
}
"
.
replace
(
'
\n
'
,
"
"
),
"
text
"
:
f
"
{
text
[
current
:
next_token
]
}
"
.
replace
(
"
\n
"
,
"
"
),
"
confidence_ner
"
:
f
"
{
np
.
around
(
np
.
mean
(
char_confidences
[
current
:
next_token
]),
2
)
}
"
,
}
for
current
,
next_token
in
pairwise
(
index
+
[
0
])
Loading