feat(vocabulary): mute the metadata woven into a bilingual gloss #825
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
project-halkyon/halkyon-learn!825
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/825/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PONS prints an entry as
Eingriff m <-s, -e> in +acc: the translationitself, with the noun's gender, its inflection and the case it governs
set in italics beside it. The seed flattened all of that into one
string, so the app rendered the annotation as if it were part of the
meaning — a wall of undifferentiated text where the printed dictionary
had two levels of information.
splitGlossMetadatarecovers the split so the annotation can rendermuted italic, the same treatment the sense label and the JMdict
classifier tags already get. It reads by shape where the catalog is
unambiguous (
<…>inflection groups,+acc-style case markers) andotherwise against a closed set of the abbreviations the catalog actually
uses.
Abbreviations that double as ordinary words are only muted in company:
a region code counts as annotation next to another marker or in a run at
either end of the gloss, so
Grammeln pl Aannotates whileKlasse Areads as the translation it is. A gloss that comes out entirely metadata
is handed back as plain text — whatever it is, it is not an annotation
of nothing.
sensesAreBilingualgates the whole thing to the PONS-derived catalogs,told apart from JMdict by their part-of-speech vocabulary (spelled-out
noun/adjectivevs JMdict'sn/v5r/adj-na). Without that gatethe short markers would eat ordinary English words in a JMdict gloss —
"old man", "art of war".
Both the structured senses view and the flat meanings list route through
the same helper, which returns a plain Text whenever there is nothing to
mute, so the widget tree (and
find.text) is unchanged for every glossthat reads as one run.
Signed-off-by: Tizian 「ティツィアーン」 raisondetredev@pm.me