2vitalik / wiktionary

Открытые наработки по некоторым проектам для Викисловаря
7 stars 1 forks source link

Nested homonyms and meanings (needed for other wiktionaries) #4

Open soshial opened 5 years ago

soshial commented 5 years ago

Let's look at this example:

= English =                  LanguageData (not much info)
== Pronunciation ==          ⇒⇒ HomonymData_1 (contains PronuncData, AnagramData, HomonymData_2, HomonymData_5)
== Etymology 1 ==            ⇒⇒⇒⇒ HomonymData_2 (contains EtymologyData, HomonymData_3, HomonymData_4)
=== Noun ===                 ⇒⇒⇒⇒⇒⇒ HomonymData_3 (contains MorphoData and ListOfMeanings)
1. meaning1, ex., syn., ant.
2. (usage notes) meaning 2
3. (gram. notes) meaning 3
=== Verb ===                 ⇒⇒⇒⇒⇒⇒ HomonymData_4 (contains MorphoData and 1 meaning)
1. mean1, ex., syn., ant.
== Etymology 2 ==            ⇒⇒⇒⇒ HomonymData_5 (contains EtymologyData + MorphoData + 1 meaning)
=== Adjective ===
...
== Anagrams ==

As you may see from the scheme:

  1. we include different BlockData inside HomonymData
  2. HomonymData may include either a list of nested HomonymData or a meaning.
soshial commented 5 years ago

Let's look at this example (mentioned in the first comment) in XDXF:

<ar>
    <k xml:lang="en">bet</k>
    <def>
        <tr>pronunciation</tr>
        <gr>anagrams</gr>
        <def>
            <etm>Etymology 1</etm>
            <def>
                <gr>Noun</gr>
                <def>
                    <deftext>meaning 1</deftext>
                    <ex>example 1</ex>
                </def>
                <def>
                    <deftext>meaning 2</deftext>
                    <ex>example 2</ex>
                </def>
                <def>
                    <deftext>meaning 3</deftext>
                    <ex>example 3</ex>
                </def>
            </def>
            <def>
                <gr>Verb</gr>
                <deftext>meaning 1</deftext>
                <ex>example 1</ex>
            </def>
        </def>
        <def>
            <etm>Etymology 2</etm>
            <def>
                <gr>Adjective</gr>
                <deftext>meaning 3</deftext>
                <ex>example 3</ex>
            </def>
        </def>
    </def>
</ar>