Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure of definitions [move to wiki] #37

Open
soshial opened this issue Jun 3, 2019 · 6 comments
Open

Structure of definitions [move to wiki] #37

soshial opened this issue Jun 3, 2019 · 6 comments

Comments

@soshial
Copy link
Owner

soshial commented Jun 3, 2019

@k-sl wrote that:

<def>/<deftext>: The usage of the elements <def> and <deftext> is confusing.

I would like to bring more clarity into usage of those. I encountered a problem while working with nested meaning groups and complex meanings that have some specific properties. Before rev. 33 there was only 1 tag for text of word meaning, which was <def>.

Let's look at different possible cases of word article structures. <entry> and <sense> are pseudocode tags and are used for easy understanding.

@soshial
Copy link
Owner Author

soshial commented Jun 3, 2019

A noun ("river") has only 2 meanings.

river (noun)

  1. a large natural stream of water flowing in a channel to the sea, a lake, or another river
  2. a large quantity of a flowing substance

this will be encoded in XDXF as following:

<ar>
    <k>river</k>
    <def>
        <def>
            <deftext>a large natural stream of water flowing in a channel to the sea, a lake, or another</deftext>
        </def>
        <def>
            <deftext>a large quantity of a flowing substance</deftext>
        </def>
    </def>
</ar>

@soshial
Copy link
Owner Author

soshial commented Jun 3, 2019

A verb "marry" with two meaning groups:

marry (verb)

  1. To join in wedlock or matrimony (...)
    a. in pass. (with ref. either to the act and ceremony, or to the wedded state as a result).
    b. Said of the priest or other functionary who performs the rite. Also absol.

  2. a. To give in marriage, cause to be married. Said esp. of a parent or guardian.
    b. With off.

It will be encoded in XDXF like this:

<ar>
    <k>marry</k>
    <def>
        <def cmt="To join in wedlock or matrimony (...)">
            <def>
                <gr>in pass.</gr>
                <deftext>(with ref. either to the act and ceremony, or to the wedded state as a result).
                </deftext>
            </def>
            <def>
                <deftext>Said of the priest or other functionary who performs the rite. Also absol.</deftext>
            </def>
        </def>
        <def>
            <def>
                <deftext>To give in marriage, cause to be married. Said esp. of a parent or guardian.</deftext>
            </def>
            <def>
                <deftext>With off</deftext>
            </def>
        </def>
    </def>
</ar>

You may draw main conclusion from aforewritten code:

Since all properties (like pronunciation, grammar features, examples, phraseologisms) may be relevant both to a smallest sense and to sense groups, I decided to make <def> act as both sense group and smallest meaning. S

There cannot it multiple <deftext> children tags from 1 <def> parent. This is because.

@soshial
Copy link
Owner Author

soshial commented Jun 4, 2019

Another example with Wiktionary word bet

Screen Shot 2019-06-04 at 13 19 35

<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>A wager, an agreement between two parties that a stake (usually money) will be paid by the loser to the winner (the winner being the one who correctly forecast the outcome of an event).
                    </deftext>
                    <ex><ex_orig>Dylan owes Fletcher $30 from an unsuccessful bet.</ex_orig></ex>
                </def>
                <def>
                    <deftext>A degree of certainty.</deftext>
                    <ex><ex_orig>It’s a safe bet that it will rain tomorrow.</ex_orig></ex>
                </def>
            </def>
            <def>
                <gr>Verb</gr>
                <deftext>To stake or pledge upon the outcome of an event; to wager.</deftext>
                <ex><ex_orig>example 1</ex_orig></ex>
            </def>
            <def>
                <deftext>To be sure of something; to be able to count on something</deftext>
                <ex><ex_orig>example 2</ex_orig></ex>
            </def>
            <def>
                <deftext>(poker) To place money into the pot in order to require others do the same, usually only used for the first person to place money in the pot on each round.
                </deftext>
                <ex><ex_orig>example 3</ex_orig></ex>
            </def>
        </def>
        <def>
            <etm>Etymology 2</etm>
            <def>
                <gr>Noun</gr>
                <deftext>The letter in Semitic languages</deftext>
            </def>
        </def>
        <def>
            <etm>Etymology 3</etm>
            <def>
                <gr>Abbreviation</gr>
                <deftext>(knitting) between</deftext>
            </def>
        </def>
    </def>
</ar>

@nikita-moor
Copy link
Contributor

Offtopic
Line <ex>example 1</ex> is incorrect according to the DTD. Are <ex_orig> tags necessary in this case?

@soshial
Copy link
Owner Author

soshial commented Jun 5, 2019

Sorry, I was a bit sloppy. My IDE did not show error automatically when I miss an element :(
Now it is fixed.

@soshial soshial changed the title Structure of definitions Structure of definitions [move to wiki] Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@soshial @nikita-moor and others