Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fextor
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
Container Registry
Operate
Environments
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
fextor
Merge requests
!1
"README.md" did not exist on "ec1b1e222f8465b47e38c0f525fc1b954c63ba5e"
adding encoding
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
adding encoding
encoding_utf-8
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Ghost User
requested to merge
encoding_utf-8
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
6fea8d3f
1 commit,
4 years ago
1 file
+
9
−
2
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
fextorbis.py
+
9
−
2
Options
@@ -6,6 +6,7 @@ from __future__ import absolute_import, unicode_literals, division
import
json
import
logging
import
subprocess
import
io
import
nlp_ws
from
desifex.docextractor
import
DocExtractor
@@ -57,8 +58,14 @@ class FextorbisWorker(nlp_ws.NLPWorker):
)
results
=
docex
.
extract_from_document
(
input_path
)
with
open
(
output_path
,
'
w
'
)
as
json_ofs
:
json
.
dump
(
results
,
json_ofs
)
encode_output
=
task_options
.
get
(
'
encoding
'
,
False
)
if
encode_output
==
False
:
with
open
(
output_path
,
'
w
'
)
as
json_ofs
:
json
.
dump
(
results
,
json_ofs
)
else
:
with
io
.
open
(
output_path
,
'
w
'
,
encoding
=
'
utf8
'
)
as
json_ofs
:
data
=
json
.
dumps
(
results
,
ensure_ascii
=
False
,
encoding
=
'
utf8
'
)
json_ofs
.
write
(
unicode
(
data
))
@staticmethod
def
__add_filter
(
cfgdict
,
feature
,
filterdef
):