Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wikstraktor
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Lex gaMe
wikstraktor
Commits
017cf28e
Commit
017cf28e
authored
2 years ago
by
Enzo Simonnet
Browse files
Options
Downloads
Patches
Plain Diff
def + ex OK
N° OK Pas bien imbriqués
parent
bd4c7d91
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
parsers/en_en.py
+6
-2
6 additions, 2 deletions
parsers/en_en.py
with
6 additions
and
2 deletions
parsers/en_en.py
+
6
−
2
View file @
017cf28e
...
@@ -47,9 +47,11 @@ class En_en_straktor(Wikstraktor):
...
@@ -47,9 +47,11 @@ class En_en_straktor(Wikstraktor):
l
=
sensesContent
.
get_lists
((
'
\\
#
'
,
'
\\
#:
'
,
'
\\
##
'
,
'
\\
##:
'
))
l
=
sensesContent
.
get_lists
((
'
\\
#
'
,
'
\\
#:
'
,
'
\\
##
'
,
'
\\
##:
'
))
i
=
0
i
=
0
senses
=
[]
senses
=
[]
nombreDef
=
0
while
i
<
len
(
l
):
while
i
<
len
(
l
):
if
l
[
i
].
pattern
==
'
\\
#
'
:
if
l
[
i
].
pattern
==
'
\\
#
'
:
newSense
=
Sense
(
f
"
{
baseId
}{
i
}
"
)
nombreDef
+=
1
newSense
=
Sense
(
f
"
{
baseId
}{
nombreDef
}
"
)
if
len
(
l
[
i
].
templates
)
>
0
:
if
len
(
l
[
i
].
templates
)
>
0
:
newSense
.
set_domain
(
l
[
i
].
templates
[
-
1
].
arguments
[
-
1
].
value
)
#We could use the second parameter for a comment
newSense
.
set_domain
(
l
[
i
].
templates
[
-
1
].
arguments
[
-
1
].
value
)
#We could use the second parameter for a comment
newSense
.
add_def
(
self
.
wiki_language
,
self
.
wtp
.
parse
(
l
[
i
].
items
[
0
]).
plain_text
().
strip
())
newSense
.
add_def
(
self
.
wiki_language
,
self
.
wtp
.
parse
(
l
[
i
].
items
[
0
]).
plain_text
().
strip
())
...
@@ -62,10 +64,12 @@ class En_en_straktor(Wikstraktor):
...
@@ -62,10 +64,12 @@ class En_en_straktor(Wikstraktor):
if
i
==
len
(
l
)
-
1
or
l
[
i
+
1
].
pattern
==
'
\\
#
'
or
l
[
i
+
1
].
pattern
==
'
\\
##
'
:
if
i
==
len
(
l
)
-
1
or
l
[
i
+
1
].
pattern
==
'
\\
#
'
or
l
[
i
+
1
].
pattern
==
'
\\
##
'
:
senses
.
append
(
newSense
)
senses
.
append
(
newSense
)
cnt
=
0
cnt
=
0
nombreSousDef
=
0
while
l
[
i
].
level
==
3
and
i
<
len
(
l
)
:
while
l
[
i
].
level
==
3
and
i
<
len
(
l
)
:
cnt
+=
1
cnt
+=
1
if
l
[
i
].
pattern
==
'
\\
##
'
:
if
l
[
i
].
pattern
==
'
\\
##
'
:
newSense2
=
Sense
(
f
"
{
baseId
}{
i
}{
cnt
}
"
)
nombreSousDef
+=
1
newSense2
=
Sense
(
f
"
{
baseId
}{
nombreDef
}{
nombreSousDef
}
"
)
if
len
(
l
[
i
].
templates
)
>
0
:
if
len
(
l
[
i
].
templates
)
>
0
:
newSense2
.
set_domain
(
l
[
i
].
templates
[
-
1
].
arguments
[
-
1
].
value
)
#We could use the second parameter for a comment
newSense2
.
set_domain
(
l
[
i
].
templates
[
-
1
].
arguments
[
-
1
].
value
)
#We could use the second parameter for a comment
newSense2
.
add_def
(
self
.
wiki_language
,
self
.
wtp
.
parse
(
l
[
i
].
items
[
0
]).
plain_text
().
strip
())
newSense2
.
add_def
(
self
.
wiki_language
,
self
.
wtp
.
parse
(
l
[
i
].
items
[
0
]).
plain_text
().
strip
())
...
...
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