Open aryamanarora opened 3 years ago
Am I understanding right that for these relations the links only require a language code and a word form? If that's it, could we extend add_definition
to take a list of strings, like college_word.add_definition('...', ..., synonyms=['university'])
? Though that maybe is a bit complicated...
I'm wondering about how to handle the multidirectionality. Like if definition X has synonyms Y and Z, we probably want to not make the library user add the same set three times. I'm not sure how FLEx and stuff handle this though
Semantic relations can be easily represented using Wiktionary definition-line templates
{{synonyms}}
,{{antonyms}}
,{{hypernyms}}
, etc. These go on the same level as usage examples (sub-part to a definition), generally preceding them. See Entry layout § Synonyms, the second type of formatting is the norm in new entries so I'm describing that.The problem is that semantic relations involve multiple
Definition
s; when we're producing entries, we want to make sure everyDefinition
involved in relationships like synonymy is listed in the proper definition line. Our data model doesn't have a neat way to handle this yet.A further issue is that on Wiktionary, semantic relations link to
Word
s rather thanDefinition
s. Since we have a highly-structured data model which will presumably maintain semantic relations at a finer level, we could try to link at theDefinition
-level. But linking to aDefinition
(which are list items) is not built into the Wikitext formatting, so we'd have to use a workaround with Wiktionary's template{{senseid}}
to make a linkable anchor at the definition-level.