Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
easymatcher
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
easymatcher
Merge requests
!2
Change output type from json txt to jsonl
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Change output type from json txt to jsonl
1-save-output-as-a-json-not-as-string
into
master
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Change output type from json txt to jsonl
Jakub Gołuch
requested to merge
1-save-output-as-a-json-not-as-string
into
master
Jun 15, 2023
Overview
0
Commits
2
Pipelines
2
Changes
1
Closes
#1 (closed)
0
0
Merge request reports
Compare
master
version 1
0919ce38
Jun 15, 2023
master (base)
and
latest version
latest version
a0e8db40
2 commits,
Jun 19, 2023
version 1
0919ce38
1 commit,
Jun 15, 2023
1 file
+
2
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/easymatcher_worker.py
+
2
−
2
View file @ a0e8db40
Edit in single-file editor
Open in Web IDE
Show full file
@@ -31,7 +31,7 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
document
[
"
text
"
]
=
_df
.
read
()
with
open
(
file_path
,
"
a
"
,
encoding
=
"
utf-8
"
)
as
_f
:
_f
.
write
(
f
"
{
json
.
dumps
(
document
)
}
\n
"
)
_f
.
write
(
json
.
dumps
(
document
)
+
"
\n
"
)
def
process
(
self
,
@@ -84,4 +84,4 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
with
open
(
output_path
,
"
w
"
,
encoding
=
"
utf-8
"
)
as
_f
:
for
out_document
in
out_documents
:
_f
.
write
(
f
"
{
json
.
dumps
(
out_document
)
}
\n
"
)
_f
.
write
(
json
.
dumps
(
out_document
)
+
"
\n
"
)
Loading