1 / 15

Tradutor em Life

Tradutor em Life. Leonardo Lemos Paulo Borges Reginaldo Valadares. Interpretador. interp(phraseUk => PhraseUk, interpUk=>constUk(syntrUk => SyntrUk, semr => Semr)) :- toDown(PhraseUk, PhraseUkm), tokenizer(PhraseUkm, WordlistUk),

wallis
Télécharger la présentation

Tradutor em Life

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tradutor em Life Leonardo Lemos Paulo Borges Reginaldo Valadares

  2. Interpretador interp(phraseUk => PhraseUk, interpUk=>constUk(syntrUk => SyntrUk, semr => Semr)) :- toDown(PhraseUk, PhraseUkm), tokenizer(PhraseUkm, WordlistUk), constUk(syntrUk => SyntrUk, semr => Semr, in_dcg => WordlistUk, out_dcg => []).

  3. Discrepâncias sintáticasInglês - Português • Ordem dos modificadores • “smelly wumpus” = wumpus fedorento • Interrogativo/Auxiliares • “Do you smell a stench?” = “Você sente um fedor?” • Imperativo • “Shoot the wumpus!” = “Atire no wumpus!” • “He shoots the wumpus” = “Ele atira no wumpus”

  4. Discrepâncias de lexicalização Inglês - Português • Conjugação dos Verbos • Inglês (Presente) • smell, smells • Português (Presente) • cheiro, cheiras, cheira, cheiramos, cheirais, cheiram • Alinhamento • Verbo + Prep. => Verbo (“Go up” = “Suba”)

  5. Discrepâncias de lexicalização Inglês - Português • Ambiguidade • Ser, estar, ficar • “The gold is (ser) mine” (Posse) • “The wumpus is (estar) at 1 2” (Localidade) • a, algum • “Do you smell a (algum) stench?” (Interrogativo) • “I smell a (um) stench.” (Afirmativo)

  6. Arquitetura do Tradutor translate (X, Z) :- interp(phraseUk => X, interpUk => _I), transfer(interpUk => _I, interpPt => _P), gener(interpPt => _P, phrasePt => Z).

  7. Regras de transferência sintáticas transfer(interpUk => constUk(syntrUk => syntr(syntcat => vg, present => yes, conjug => ConjugUk, agreeFt => AgreeFtUk, head => HeadUk)), interpPt => constPt(syntrPt => syntr(syntcat => vg, present => yes, conjug => ConjugUk, agreeFt => AgreeFtUk, head => HeadPt))) :- transfer(interpUk => HeadUk, interpPt => HeadPt).

  8. Regras de transferência lexicais (léxico bilíngüe) transfer(interpUk => constUk(syntrUk => syntr(syntcat => adv, present => yes, lex => X)), interpPt => constPt(syntrPt => syntr(syntcat => adv, present => yes, lex => changeAdv(X)))). changeAdv("left") -> "esquerda". changeAdv("right") -> "direita".

  9. Ver Arquivo Life Regras de transferêncialexico-sintática

  10. Usar gramáticas de cláusulas definidas para geração • Gramática Inglês • interp(“the wumpus is dead”,X)? • X é um psi-term • Transformação de Inglês para Português utilizando DCG • transf(X,Y)? • Gramática Português • gener(Y,Z)?

  11. Usar gramáticas de cláusulas definidas para geração • Exemplo Life > constUk(syntrUk => X, in_dcg => ["the"], out_dcg => [])? *** Yes X = syntr(lex => "the", num => sing, present => yes, ref => def, syntcat => article). --1> constUk(syntrUk => X, in_dcg => Y, out_dcg => [])? *** Yes X = syntr(lex => "the", num => sing, present => yes, ref => def, syntcat => article), Y = ["the"].

  12. Regras estruturais/concordância da sintaxe do português • Determinantes • Inglês (Não depende do gênero do substantivo) • the car, the house • Português (Depende do gênero do substantivo) • o carro, a casa

  13. Regras de escolha das palavras de classe fechada do português constPt (syntrPt=>syntr(syntcat=>article, present=>yes, mood=>{declar;imper}, gen=>masc, ref=>indef, num=>sing)) --> ["um"]? constPt (syntrPt=>syntr(syntcat=>article, present=>yes, mood=>inter, gen=>masc, ref=>indef, num=>sing)) --> ["algum"]?

  14. Regras morfológica do português • Plural (Verbo) • Inglês • Só altera a terceira pessoa do singular • Português • Todas as pessoas podem variar

  15. Demo ao vivo

More Related