Dependency based re-ordering

From Apertium
Revision as of 20:59, 23 March 2009 by Francis Tyers (talk | contribs)
Jump to navigation Jump to search

There are dependency parsers based on constraint grammar for a few languages which Apertium would like to treat (e.g. Sámi and Faroese), it might be a nice idea to be able to do re-ordering before transfer (or during transfer) based on the dependency tree (this would not do lexical transfer, concordance or anything else, just LU reordering).

The first stage would be to convert cg-proc to output dependency information along with the lexical units. The second stage would be to write a module that builds a tree and does moving operations.

Examples

In the example below,

Í  upphavi   skapti  Gud himmal og  jørð
In beginning created God heaven and earth

`In the beginning God created the heavens and the earth'

The subject could be moved before the verb using the dependency information, while inserting the determiners and doing concordance etc. would be left up to the rest of the transfer. The benefit to using the dependency graph to move stuff around is that it allows for limitless sized NPs etc.

Annotation

"<Í>"
        "í" Pr @ADVL> #1->3 
"<upphavi>"
        "upphav" N Neu Sg Dat Indef @P< #2->1 
"<skapti>"
        "skapa" V Ind Prt Sg @VMAIN #3->0 
"<Gud>"
        "gudur" N Msc Sg Acc Indef @<SUBJ #4->3 
"<himmal>"
        "himmal" N Msc Sg Acc Indef @<OBJ #5->3 
"<og>"
        "og" CC @CC #6->5 
"<jørð>"
        "jørð" N Fem Sg Acc Indef @<OBJ #7->3 
"<.>"
        "." CLB #8->0 

Graph

                                       0
                                       |
 (2)upphav----- (1)í[@ADVL]-------(3)skapa[@VMAIN]
                                     |   | 
                                     |   |________ (5)himmal[@OBJ]----(6)og
                             ________|                | 
                            |                         ---------(7)jørð
                       (4)gudur[@SUBJ]