Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
easymatcher
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
easymatcher
Commits
e9bab9a0
Commit
e9bab9a0
authored
2 years ago
by
Jakub-Goluch
Browse files
Options
Downloads
Patches
Plain Diff
Add feature to check whether document has a valid json/jsonl format, add tests
parent
8864e268
Branches
Branches containing commit
1 merge request
!4
Resolve "Read not only .txt files"
Pipeline
#11287
passed with stages
in 7 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/easymatcher_worker.py
+1
-1
1 addition, 1 deletion
src/easymatcher_worker.py
with
1 addition
and
1 deletion
src/easymatcher_worker.py
+
1
−
1
View file @
e9bab9a0
...
...
@@ -25,7 +25,7 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
def
is_jsonl
(
document_path
:
str
|
Path
)
->
bool
:
"""
Validates whether text file has json/jsonl structure
and has
"
text
"
keyword
.
"""
"""
Validates whether text file has json/jsonl structure.
"""
try
:
with
open
(
document_path
,
'
r
'
,
encoding
=
"
utf-8
"
)
as
file
:
for
line
in
file
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment