Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nlreqdataset-unl-enco
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNL
nlreqdataset-unl-enco
Commits
38c02f38
Commit
38c02f38
authored
5 years ago
by
David Rouquet
Browse files
Options
Downloads
Patches
Plain Diff
Ignore commit when parsing a document
Closes
#4
parent
1b031c32
No related branches found
No related tags found
No related merge requests found
Pipeline
#196
passed
5 years ago
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/unlizeXml.py
+3
-2
3 additions, 2 deletions
scripts/unlizeXml.py
with
3 additions
and
2 deletions
scripts/unlizeXml.py
+
3
−
2
View file @
38c02f38
#!/bin/env python3
from
lxml
import
etree
from
lxml
import
etree
,
objectify
import
requests
import
click
import
tempfile
...
...
@@ -125,7 +125,8 @@ def unl2dot(text, path):
help
=
'
Path of the unltools jar
'
)
def
unlizeXml
(
input
,
output
,
lang
,
dry_run
,
svg
,
unltools_path
):
doc
=
etree
.
parse
(
input
)
parser
=
etree
.
XMLParser
(
remove_comments
=
True
)
doc
=
objectify
.
parse
(
input
,
parser
=
parser
)
remove_namespace
(
doc
)
tags
=
[
'
title
'
,
'
text_body
'
,
'
term
'
,
'
meaning
'
]
for
t
in
tags
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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