a path-based transfer model for machine translation

31
A Path-based Transfer Model for Machine Translation Dekang Lin presented by Joshua Johanson

Upload: lala

Post on 20-Jan-2016

34 views

Category:

Documents


0 download

DESCRIPTION

A Path-based Transfer Model for Machine Translation. Dekang Lin presented by Joshua Johanson. Training. Get a parallel corpus Source language is in dependency trees The text is word-aligned Extract the paths from dependency trees Learn translation rules from the paths using word alignment. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Path-based Transfer Model for Machine Translation

A Path-based Transfer Model for

Machine Translation

Dekang Lin

presented by Joshua Johanson

Page 2: A Path-based Transfer Model for Machine Translation

Training

• Get a parallel corpus– Source language is in dependency trees– The text is word-aligned

• Extract the paths from dependency trees

• Learn translation rules from the paths using word alignment

Page 3: A Path-based Transfer Model for Machine Translation

Translation

• Parse the sentence into dependency trees

• Extract Paths

• Merge the paths

• Choose the transfer rules that give the highest probability

• Output the resulting sentence

Page 4: A Path-based Transfer Model for Machine Translation

What is a Dependency Tree?

• A dependency tree shows the relationship between the words of a sentence. Links are directed from the head to the modifier.

Page 5: A Path-based Transfer Model for Machine Translation

Comparing a Dependency Tree with a POS Tree

S:found

N:John VP:found

V:found NP:solution

NP:solution PP:to

Det:aN:solution P:to NP:problem

Det:the N:problem

Page 6: A Path-based Transfer Model for Machine Translation

What is a path?

A simple path is a link of two nodes or two links with an unassigned preposition.

Page 7: A Path-based Transfer Model for Machine Translation

Learning the Transfer Rules

• Extracts only paths with all words aligned– A prepostion in the middle of a path is allowed

to be aligned.

• Uses the word alignment to create the relative order of the paths. (there could be gaps)

• Learns the word alignment and the remapping.

Page 8: A Path-based Transfer Model for Machine Translation

Phrases

• Head span: the word sequence aligned with the node n.

• Phrase span: the word sequence from the lower bound of the head spans of all nodes in the subtree rooted at n to the upper bound of the same set of spans.

• All of these correspond to the index of the target language.

Page 9: A Path-based Transfer Model for Machine Translation

Connect cablespower

Branchez les deux câbles

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

both to the controller

d’ alimentation sur le contrôleur

Page 10: A Path-based Transfer Model for Machine Translation

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

• Let S be the phrase span of a sibling of M (or head span of H) that is between H’ and M’ and closest to M’. In this case it corresponds to câbles d’ alimentation (S).

Connect cablespower

Branchez les deux câbles

both to the controller

d’ alimentation sur le contrôleur

Page 11: A Path-based Transfer Model for Machine Translation

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

• Let S be the phrase span of a sibling of M (or head span of H) that is between H’ and M’ and closest to M’. In this case it corresponds to câbles d’ alimentation (S).

• The right hand side is the simple link in the original language

Connect cablespower

Branchez les deux câbles

both to the controller

d’ alimentation sur le contrôleur

Page 12: A Path-based Transfer Model for Machine Translation

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

• Let S be the phrase span of a sibling of M (or head span of H) that is between H’ and M’ and closest to M’. In this case it corresponds to câbles d’ alimentation (S).

• The right hand side is the simple link in the original language • The left hand side is:

– The link between H’ and M’

Connect cablespower

Branchez les deux câbles

both to the controller

d’ alimentation sur le contrôleur

Page 13: A Path-based Transfer Model for Machine Translation

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

• Let S be the phrase span of a sibling of M (or head span of H) that is between H’ and M’ and closest to M’. In this case it corresponds to câbles d’ alimentation (S).

• The right hand side is the simple link in the original language • The left hand side is:

– The link between H’ and M’– A link between M’ and the nodes between S and the phrase span of M.

Connect cablespower

Branchez les deux câbles

both to the controller

d’ alimentation sur le contrôleur

Page 14: A Path-based Transfer Model for Machine Translation

• Start with a simple path, let’s say from Connect (H) to controller (M), where H aligns to Branchez (H’) and M aligns to contrôleur (M’). (A simple path can have a middle node with an unaligned preposition, like “to”.)

• Let S be the phrase span of a sibling of M (or head span of H) that is between H’ and M’ and closest to M’. In this case it corresponds to câbles d’ alimentation (S).

• The right hand side is the simple link in the original language • The left hand side is:

– The link between H’ and M’– A link between M’ and the nodes between S and the phrase span of M.

• All unaligned word (like sur) will be leaf nodes.

Connect cablespower

Branchez les deux câbles

both to the controller

d’ alimentation sur le contrôleur

Page 15: A Path-based Transfer Model for Machine Translation

To align more complicated paths, just combine the translation of more simple paths

This can create rules that are not paths:

Page 16: A Path-based Transfer Model for Machine Translation

Divergences

• This will create dependency trees that are not consistent with the new language.

• In this case the translation will still produce the words in the correct order.

X swim across Y

X cruzar nadandoY

Page 17: A Path-based Transfer Model for Machine Translation

21 permutations

Page 18: A Path-based Transfer Model for Machine Translation

Generalize

Page 19: A Path-based Transfer Model for Machine Translation

Calculate Translation Probability

• Si is the path (Connect to controller)• Ti is the tree fragment (Branchez sur contrôleur)• c(Si) is the count of Si

• c(Ti,Si) is the count of both Ti and Si occuring together• M is a constant

Page 20: A Path-based Transfer Model for Machine Translation

Translation• Parse the sentence to obtain its dependency structure.

Page 21: A Path-based Transfer Model for Machine Translation

Translation• Parse the sentence to obtain its dependency structure.• Extract all the paths in the dependency tree and retrieve

the translations of all the paths.

Page 22: A Path-based Transfer Model for Machine Translation

Translation• Parse the sentence to obtain its dependency structure.• Extract all the paths in the dependency tree and retrieve

the translations of all the paths.• Find rules that can be merged to cover the whole tree

Page 23: A Path-based Transfer Model for Machine Translation

Merging

• If two target nodes are mapped to the same source node, it gets merged.

• Merging will not create a loop– We only have to worry about the unaligned

words, which are leaf nodes and don’t point to anything

• This new translation is a tree– They are all connected and there aren’t any

loops.

Page 24: A Path-based Transfer Model for Machine Translation

Node ordering

• If two nodes go on different sides of h, then go to the respective sides.– deux câbles & câbles existants– deux câbles existants

Page 25: A Path-based Transfer Model for Machine Translation

Node ordering

• If they are on the same side as h in the target sentence, stay the same distance from h as in the source sentence.– existing coaxial cables– câbles coaxiaux existants

Page 26: A Path-based Transfer Model for Machine Translation

Node ordering

• If they are on the same side in the target sentence, but not the source sentence, use the word order of the original in the source sentence– m1 h m2 (source)– h m1 m2 (target)

Page 27: A Path-based Transfer Model for Machine Translation

Translation• Parse the sentence to obtain its dependency structure.• Extract all the paths in the dependency tree and retrieve

the translations of all the paths.• Find rules that can be merged to cover the whole tree• Output the one with highest probability

Page 28: A Path-based Transfer Model for Machine Translation

Probability

• C is a set of paths covering S

• There can be overlap in C, but no path will completely contained in another in the final output.

• This is a direct translation (not noisy channel model)

Page 29: A Path-based Transfer Model for Machine Translation

Experiment

• Used English-French portion of 1999 European Parliament Proceedings.

• Used 1,755 sentences with 5-15 words out of 116,889.

• Used Minipar to parse the sentences.

• Used ProAlign to align the words.

Page 30: A Path-based Transfer Model for Machine Translation

Results

System IBM Model 4 Path-based Phrasal Model

BLEU Score .2555 .2612 .3149

Page 31: A Path-based Transfer Model for Machine Translation

What is different about this approach?

• Translations are based on a dependency tree in the source language– Syntactically based– There are fewer paths than subtrees

(quadratic instead of exponential)– Less sparse

• It automatically learns word order• No need to know anything but syntax of

target language