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
89d49068
Commit
89d49068
authored
1 year ago
by
Mathieu Loiseau
Browse files
Options
Downloads
Patches
Plain Diff
pas corrigé, mais ne plante plus
parent
1fc4694c
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
wikstraktor.py
+10
-2
10 additions, 2 deletions
wikstraktor.py
with
10 additions
and
2 deletions
wikstraktor.py
+
10
−
2
View file @
89d49068
...
@@ -599,16 +599,24 @@ class Wikstraktor:
...
@@ -599,16 +599,24 @@ class Wikstraktor:
pattern_ex
=
self
.
constants
[
'
sense_pattern
'
][
0
][
"
add_subdef
"
]
+
self
.
constants
[
'
sense_pattern
'
][
0
][
"
ex
"
]
pattern_ex
=
self
.
constants
[
'
sense_pattern
'
][
0
][
"
add_subdef
"
]
+
self
.
constants
[
'
sense_pattern
'
][
0
][
"
ex
"
]
#Process examples
#Process examples
a
=
0
a
=
0
#print(
newSense,
sub_items)# DEBUG:
#print(sub_items)# DEBUG:
for
item_list
in
sub_items
:
for
item_list
in
sub_items
:
print
(
a
,
item_list
.
pattern
,
'
vs
'
,
pattern_ex
)
# DEBUG:
if
item_list
.
pattern
==
pattern_ex
:
if
item_list
.
pattern
==
pattern_ex
:
for
item
in
item_list
.
items
:
for
item
in
item_list
.
items
:
newSense
.
add_example
(
self
.
process_example
(
item
))
newSense
.
add_example
(
self
.
process_example
(
item
))
#Si on veut traiter les sous items (ex traductions), on peut utiliser
#Si on veut traiter les sous items (ex traductions), on peut utiliser
#item_list.sublists(a)
#item_list.sublists(a)
# print(a, item_list.pattern, 'vs', pattern_subdef, item_list.items, len(item_list.sublists()))# DEBUG:
# print(item_list.sublists(a))# DEBUG:
if
def_level
and
item_list
.
pattern
==
pattern_subdef
:
if
def_level
and
item_list
.
pattern
==
pattern_subdef
:
for
item
in
item_list
.
items
:
for
item
in
item_list
.
items
:
newSense
.
add_subsense
(
self
.
process_definition
(
item
,
item_list
.
sublists
(
a
),
False
))
try
:
sub_sub
=
item_list
.
sublists
(
a
)
except
IndexError
as
err
:
sub_sub
=
[]
print
(
sub_sub
,
item_list
.
sublists
())
newSense
.
add_subsense
(
self
.
process_definition
(
item
,
sub_sub
,
False
))
a
+=
1
a
+=
1
return
newSense
return
newSense
...
...
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