Representation of linguistic information and word and sentence alignments in XML files

Phillip Ströbel <[email protected]>
Newsgroups gmane.text.tei.general
Message-ID <[email protected]>
Dear members of the TEI community,

I have several questions regarding the annotation of linguistic information in a corpus consisting of XML documents.

We would like to add parsing information to sentences. We represent a normal sentence like this:

<s id="a1-s6" lang="de">
        <w id="a1-s6-w1" lemma="d" pos="ART">Die</w>
        <w id="a1-s6-w2" lemma="weit" pos="ADJA">weiten</w>
        <w id="a1-s6-w3" lemma="," pos="$,">,</w>
        <w id="a1-s6-w4" lemma="öde" pos="ADJA">öden</w>
        <w id="a1-s6-w5" lemma="Gebiet" pos="NN">Gebiete</w>
        <w id="a1-s6-w6" lemma="," pos="$,">,</w>
        <w id="a1-s6-w7" lemma="d" pos="PRELS">die</w>
        <w id="a1-s6-w8" lemma="Kälte" pos="NN">Kälte</w>
        <w id="a1-s6-w9" lemma="," pos="$,">,</w>
        <w id="a1-s6-w10" lemma="d" pos="PRELS">der</w>
        <w id="a1-s6-w11" lemma="Schnee" pos="NN">Schnee</w>
        <w id="a1-s6-w12" lemma="sein" pos="VAFIN">sind</w>
        <w id="a1-s6-w13" lemma="mein" pos="PPOSAT">meine</w>
        <w id="a1-s6-w14" lemma="bevorzugt" pos="ADJA">bevorzugte</w>
        <w id="a1-s6-w15" lemma="Umgebung" pos="NN">Umgebung</w>
        <w id="a1-s6-w16" lemma=";" pos="$.">;</w>
 </s>

The "a1" in the sentence and word IDs corresponds the article in which a sentence occurs. Moreover, we have a lemma and a part-of-speech tag (pos) for every word.

Our first idea is to include the parsing information directly in the w-elements, which would look like this:

<s id="a1-s6" lang="de">
        <w deprel="DET" head="a1-s6-w5" id="a1-s6-w1" lemma="d" pos="ART">Die</w>
        <w deprel="ATTR" head="a1-s6-w5" id="a1-s6-w2" lemma="weit" pos="ADJA">weiten</w>
        <w deprel="-PUNCT-" head="a1-s6-w2" id="a1-s6-w3" lemma="," pos="$,">,</w>
        <w deprel="KON" head="a1-s6-w2" id="a1-s6-w4" lemma="öde" pos="ADJA">öden</w>
        <w deprel="NEB" head="a1-s6-w12" id="a1-s6-w5" lemma="Gebiet" pos="NN">Gebiete</w>
        <w deprel="-PUNCT-" head="a1-s6-w5" id="a1-s6-w6" lemma="," pos="$,">,</w>
        <w deprel="SUBJ" head="a1-s6-w12" id="a1-s6-w7" lemma="d" pos="PRELS">die</w>
        <w deprel="PRED" head="a1-s6-w12" id="a1-s6-w8" lemma="Kälte" pos="NN">Kälte</w>
        <w deprel="-PUNCT-" head="a1-s6-w8" id="a1-s6-w9" lemma="," pos="$,">,</w>
        <w deprel="DET" head="a1-s6-w11" id="a1-s6-w10" lemma="d" pos="PRELS">der</w>
        <w deprel="KON" head="a1-s6-w8" id="a1-s6-w11" lemma="Schnee" pos="NN">Schnee</w>
        <w head="root" id="a1-s6-w12" lemma="sein" pos="VAFIN">sind</w>
        <w deprel="DET" head="a1-s6-w15" id="a1-s6-w13" lemma="mein" pos="PPOSAT">meine</w>
        <w deprel="ATTR" head="a1-s6-w15" id="a1-s6-w14" lemma="bevorzugt" pos="ADJA">bevorzugte</w>
        <w deprel="PRED" head="a1-s6-w12" id="a1-s6-w15" lemma="Umgebung" pos="NN">Umgebung</w>
        <w deprel="-PUNCT-" head="a1-s6-w15" id="a1-s6-w16" lemma=";" pos="$.">;</w>
</s>

Every word has another word ID from the same sentences as its head (except for the root) and every w-element specifies the dependency relation to the head (except for the root). 

Is this a practical solution?

Moreover, we would like to integrate sentence alignment information, since we are working with a multilingual corpus.

Our idea is to integrate this information directly into the s-elements (like we do for articles which are translated). This could look like in the following:

<s id="a1-s6" lang="de" alignment_targets="SAC-Jahrbuch_1990_fr.xml:a1-s5">

The alignment target specifies the article and sentence ID in the yearbook in the other language which corresponds to the current s-element. Or would it be better to provide this information in a link group or just link element and then have the words in another, separate element?

<s id="a1-s6" lang="de">
    <link xtype="1-2" xtargets="SAC-Jahrbuch_1990_fr.xml:a1-s5;SAC-Jahrbuch_1990_fr.xml:a1-s6"/>
    <words>
        <w deprel="DET" head="a1-s6-w5" id="a1-s6-w1" lemma="d" pos="ART">Die</w>
        <w deprel="ATTR" head="a1-s6-w5" id="a1-s6-w2" lemma="weit" pos="ADJA">weiten</w>
        <w deprel="-PUNCT-" head="a1-s6-w2" id="a1-s6-w3" lemma="," pos="$,">,</w>
        <w deprel="KON" head="a1-s6-w2" id="a1-s6-w4" lemma="öde" pos="ADJA">öden</w>
        ....
    </words>
</s>

Same for word alignment: Separate link groups or alignment information directly in the w-elements, like so:

<w deprel="DET" head="a1-s6-w5" id="a1-s6-w1" lemma="d" pos="ART" alignment_targets="SAC-Jahrbuch_1990_fr.xml:a1-s6-w1 SAC-Jahrbuch_1990_it.xml:a1-s5-w1>Die</w>

I'm looking forward to your suggestions.

Kind regards,

Philllip
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.