Skip to content

Commit 678a85f

Browse files
Added "dummy-reset-section-header"
Using "dummy-section-header" on its own will also empty TableContext.section_header if its tag contents, but this is more explicit and works when you need to add tags to a normal header.
1 parent a181c13 commit 678a85f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

wiktextract/inflection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,8 @@ def merge_row_and_column_tags(form, some_has_covered_text):
20402040
if "dummy-section-header" in tt:
20412041
tblctx.section_header = tt
20422042
break
2043+
if "dummy-reset-section-header" in tt:
2044+
tblctx.section_header = []
20432045
# Text between headers on a row causes earlier headers to
20442046
# be reset
20452047
if have_text:

wiktextract/inflectiondata.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@
173173
"past tense": "past",
174174
"Positive participial": "positive participle",
175175
"Negative participial": "negative participle",
176-
"Relative forms": "relative object-concord",
177176
"present tense": "present",
178177
"future tense": "future",
179178
"Neuter": "neuter",
@@ -6788,7 +6787,7 @@
67886787
"Tensed forms": {
67896788
"default": "",
67906789
"lang": "Swahili",
6791-
"then": "dummy-section-header",
6790+
"then": "dummy-reset-section-header",
67926791
},
67936792
"Object concord (indicative positive)": {
67946793
"default": "object-concord indicative positive",
@@ -6798,7 +6797,7 @@
67986797
"Relative forms": {
67996798
"default": "",
68006799
"lang": "Swahili",
6801-
"then": "dummy-section-header",
6800+
"then": "dummy-section-header relative object-concord",
68026801
},
68036802
"2nd Person Plural": "second-person plural",
68046803
"free state": "free-state", #aɣemmar/Tarifit

wiktextract/tags.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5470,6 +5470,10 @@
54705470
# new Swahili verb tables) is separated from the section it is a header
54715471
# of, use this to force a section header that is active until it is
54725472
# replaced by something else down the line.
5473+
"dummy-reset-section-header": "dummy", # Explicitly remove the saved
5474+
# tags in TableContext.section_header; you can also call dummy-section-
5475+
# header with an otherwise empty tag list, but this is needed when you
5476+
# need to have tags too.
54735477
"durative": "aspect", # Verb form XXX same as continuative?
54745478
"eclipsis": "misc",
54755479
"egressive": "case", # Case? e.g., дворец/Komi-Zyrian

0 commit comments

Comments
 (0)