Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
democrasci_preprocWP1
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
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
Marta Balode
democrasci_preprocWP1
Commits
e1b25a41
Commit
e1b25a41
authored
6 years ago
by
Lili Gasser
Browse files
Options
Downloads
Patches
Plain Diff
ugly workaround for Z'graggen
parent
062b2719
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/utils_annot.py
+5
-0
5 additions, 0 deletions
src/python/utils_annot.py
with
5 additions
and
0 deletions
src/python/utils_annot.py
+
5
−
0
View file @
e1b25a41
...
@@ -444,6 +444,10 @@ def label_speechstart(XML_new, ind_p, ind_t, text, ind_tl_colon, df_names, list_
...
@@ -444,6 +444,10 @@ def label_speechstart(XML_new, ind_p, ind_t, text, ind_tl_colon, df_names, list_
# add attribute speech_start to textbox
# add attribute speech_start to textbox
XML_new
[
ind_p
][
ind_t
].
attrib
[
'
text_type
'
]
=
'
speech_start
'
XML_new
[
ind_p
][
ind_t
].
attrib
[
'
text_type
'
]
=
'
speech_start
'
# MP Z'graggen causes problem in xml because of '
if
'
graggen
'
in
str_name
:
str_name
=
'
Zgraggen Max Johann (Basel-Stadt BS)
'
# add speaker as attribute to first textline
# add speaker as attribute to first textline
XML_new
[
ind_p
][
ind_t
][
0
].
attrib
[
'
speaker
'
]
=
(
str_name
,
str_role
,
list_uniqueID
,
str_canton
)
XML_new
[
ind_p
][
ind_t
][
0
].
attrib
[
'
speaker
'
]
=
(
str_name
,
str_role
,
list_uniqueID
,
str_canton
)
...
@@ -1097,6 +1101,7 @@ def collect_info(XML_root, bln_print=False):
...
@@ -1097,6 +1101,7 @@ def collect_info(XML_root, bln_print=False):
# construct key
# construct key
key
=
'
_
'
.
join
((
index_page
,
speaker
,
index_start
,
index_end
))
key
=
'
_
'
.
join
((
index_page
,
speaker
,
index_start
,
index_end
))
# add to dictionary
# add to dictionary
dict_speeches
[
key
]
=
(
speaker_tpl
,
complete_text
)
dict_speeches
[
key
]
=
(
speaker_tpl
,
complete_text
)
...
...
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