Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Allzweckmesser
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
Messerschleifer
Allzweckmesser
Commits
cde39939
Commit
cde39939
authored
6 years ago
by
Simon Will
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.cl.uni-heidelberg.de:Messerschleifer/Allzweckmesser
parents
3656cdf7
95a3d358
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
allzweckmesser/scanner.py
+6
-4
6 additions, 4 deletions
allzweckmesser/scanner.py
with
6 additions
and
4 deletions
allzweckmesser/scanner.py
+
6
−
4
View file @
cde39939
...
...
@@ -233,7 +233,7 @@ def get_syllables(reading):
def
muta_cum_liquida
(
verse
):
mcl_regex
=
re
.
compile
(
r
'
([bpskgdt]|(qu)|(qv)),?\s?[lrmn]
'
)
mcl_regex
=
re
.
compile
(
r
'
[aeiouv](
([bps
c
kgdt]|(qu)|(qv)),?\s?[lrmn]
)([aeiouv]|[.?!]|$)
'
)
if
re
.
search
(
mcl_regex
,
verse
.
text
):
matches
=
re
.
finditer
(
mcl_regex
,
verse
.
text
)
...
...
@@ -243,10 +243,9 @@ def muta_cum_liquida(verse):
for
syllable
in
token
.
syllables
:
if
syllable
.
span
[
0
]
<=
match
.
start
()
<
syllable
.
span
[
1
]:
syllable
.
phenomena
[
'
muta cum liquida
'
]
=
Phenomenon
(
chars
=
match
.
group
(
1
))
syllable
.
phenomena
[
'
muta cum liquida
'
]
=
Phenomenon
(
chars
=
match
.
group
(
0
))
def
positional_lengthening
(
verse
):
pl_regex
=
re
.
compile
(
r
'
[aeiouv](((([bcdfgjklmnprstvwxz]|(qu)),?\s?){2,})|[xz])
'
)
...
...
@@ -259,6 +258,7 @@ def positional_lengthening(verse):
for
syllable
in
token
.
syllables
:
if
syllable
.
span
[
0
]
<=
match
.
start
()
<
syllable
.
span
[
1
]:
s
.
syllable_length
=
2
syllable
.
phenomena
[
'
positional lengthening
'
]
=
Phenomenon
(
chars
=
match
.
group
(
1
))
...
...
@@ -306,10 +306,12 @@ def parse_verse(verse):
for
token
in
new_reading
.
tokens
:
for
s
in
token
.
syllables
:
if
blueprint
[
syll_id
]
==
"
1
"
:
print
(
1
)
s
.
syllable_length
=
1
if
'
positional lengthening
'
in
s
.
phenomena
and
'
muta cum liquida
'
in
s
.
phenomena
:
s
.
phenomena
[
'
positional lengthening
'
].
overruled_by
=
'
muta cum liquida
'
elif
blueprint
[
syll_id
]
==
"
2
"
:
print
(
2
)
s
.
syllable_length
=
2
syll_id
+=
1
...
...
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