Fragmentation

From Apertium
Revision as of 17:20, 12 February 2012 by Bech (talk | contribs) (Début de traduction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Transfert superficiel

Le transfert superficiel signifie qu'il n'y a pas d'arbre d'analyse (qui sont utilisés dans le "transfert profond"). Mais alors comment va se produire la réorganisation de la phrase ?

Par fragmentation (en trois étapes): D'abord on réordonne les mots dans le fragment, ensuite on réordonne les fragments.

  • D'abord, on reconnaît les modèles d'expression, comme adjectif + nom ou adjectif + adjectif + nom
  • pour cela, on fabrique un 'pseudo lemme', avec une balise contenant le type - normalement 'SN' (groupe nominal) or SV (groupe verbal)
  • ensuite, on traduit par rapport à ces pseudo mots en décomposant la langue jusqu'à ses constituants essentiels, fondamentalement

Fragmentation expliquée

Nos règles sont basées sur les modèles de la langue source; on a besoin d'utiliser la fragmentation pour par exemple la paire anglais-espéranto, donc la première tâche est d'identifier ces modèles.

the man sees the girl (l'homme voit la fille)

Fragmentation :

SN(the man) SV(sees) SN(the girl)

(Normalement, en anglais ce sont 'NP' et 'VP' respectivement pour 'groupe nominal' et 'groupe verbal', mais nous nous en tiendrons à la convention établie pour apertium)

Deux règles sont nécessaires pour faire ces fragments : plus tard, d'autres règles de fractionnement peuvent être reconnues 'the tall man' (l'homme grand) 'my favourite Spanish friend' (mon ami espagnol favori) 'the prettiest Polish girl' (la plus jolie fille polonaise) etc. comme SN; 'was going' (allait), 'had been going (était allé)', 'must have been going' (doit être allé) comme SV. On considère d'abord ces modèles séparément, mais le marquage des fragments avec n'importe quelle information sera utile plus tard.

So the chunks are normally given a 'pseudo lemme' that matches the pattern that matched them ('the man', 'my friend' will be put in a chunk called 'det_nom', etc.), the first tag added is the phrase type; after that, tags that are needed in the next set of rules. Essentially, we're treating phrase chunks in the same way that the morphological analyser treats lexemes ('surface forms').

Donc, en premant 'big cat', on obtiendrait :

^adj_nom<SN><sg><CD>{^granda<ad><2><3>$ ^kato<n><2><3>$}$

The numbers in the lemma tags (here <2><3>) mean 'take the information from chunk tag number #'. CD means 'Case to be Determined (it's not fully established, as GD and ND are, but it's the logical one to use).

So, with a simple SN SV SN, we can have a rule that outputs the same things in the same order, but changes the 'CD' of SN number 1 to 'nom', and of SN number 2 to 'acc'.

Exemple

I saw a signal

becomes after tagger disambiguation

^prpers<prn><subj><p1><mf><sg>$ 
^see<vblex><past>$ 
^a<det><ind><sg>$ 
^signal<n><sg>$.

which is transfered and chunked into

^prnpers<SN><p1><mf><sg>{^prpers<prn><subj><2><3><4>$}$ 
^verb<SV><past>{^vidi<vblex><past>$}$ 
^nom<SN><sg><nom>{^signalo<n><2><3><4>$}$.

and transformed by rule SN SV SN<nom> -> SN SV SN<acc>

^prnpers<SN><p1><mf><sg>{^prpers<prn><subj><2><3><4>$}$
^verb<SV><past>{^vidi<vblex><past>$}$
^nom<SN><sg><acc>{^signalo<n><2><3><4>$}$.

Note how the chunk has now tags nom<SN><sg><acc> and therefore ^signalo<n><2><3><4>$ gets these tags when unchunking:

^prpers<prn><subj><p1><mf><sg>$ 
^vidi<vblex><past>$ 
^signalo<n><sg><acc>$. 

Voir aussi

Liens externes