1 / 21

Parsing Akkadian Verbs in Prolog

Parsing Akkadian Verbs in Prolog. Aaron Macks Brandeis University. Overview. Akkadian Prolog Parsing using Prolog Java and web interface Examples. Akkadian. Verbal system based on three radicals, R 1 -R 2 -R 3 , commonly from the verb paräsum: P-R-S(to divide)

jered
Download Presentation

Parsing Akkadian Verbs in Prolog

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. Parsing Akkadian Verbs in Prolog Aaron Macks Brandeis University ACL-02

  2. Overview • Akkadian • Prolog • Parsing using Prolog • Java and web interface • Examples ACL-02

  3. Akkadian • Verbal system based on three radicals, R1-R2-R3, commonly from the verb paräsum: P-R-S(to divide) • Any one or more radical can be ‘weak’ from letters in the earlier Proto-Semitic which dropped out or a soundless Aleph(’), i.e. elûm ’-L-weak ACL-02

  4. Verbs in Akkadian • Description of a conjugated verb has six parts • Stem: P-R-S • Stem type: G, D, N, $, Xt, Xn, Xtn • Person: 1st, 2nd, 3rd • Gender: M, F or common • Number: Singular or plural • Tense: Preterite, durative, perfect, imperfect, precative or vetitive • Ex: iprus -> PRS, 3CS, G-Preterite iqabbû-ma -> QB`, 3MP, G-Durative ACL-02

  5. Overview • Akkadian • Prolog • Parsing using Prolog • Java and web interface • Examples ACL-02

  6. Prolog Introduction • Logical programming language, emerged in the 1970’s, ISO standard in 1996 • Modern implementations can accept: • Declarations: • father(X,Y) :- male(X),parent(X,Y). • DCG(definite clause grammar) rules: • s(X,Y) --> [c]. • s(X,Y) --> X, s(X,Y), Y. • s --> s([a],[b]). ACL-02

  7. DCGs Continued • s([a,a,a,c,b,b,b],[]). • yes • s([a,a,a,c,b,b,b,d,d], T). • T = [d, d] • s([a,a,a,c,b,b|N],T). • N = [b|_G293] T = _G293 • s([n,i],[e], O, []). • O = [c] ; • O = [n, i, c, e] ; • O = [n, i, n, i, c, e, e] ACL-02

  8. Overview • Akkadian • Prolog • Parsing using Prolog • Java and web interface • Examples ACL-02

  9. Program Flow ?- verb(A,B,C,Type,[i,p,r,u,s]). • Prolog call to parse iprus, with A,B, and C bound to the stem and Type a string of the verb type • verb calls: G, D, N, G-suffix, D-suffix, N-suffix • Each of G, D, and N call: preterite, perfect, durative, imperfect, vetitive, and precative • Each of the tenses call: strong, first-weak, second-weak, and third-weak. Some also have A, E, N, or W classes as well. ACL-02

  10. Sample ?- verb(A,B,C, Type, [ii,p,u,s],[]). verb(Ca, Cb, Cc, ['G'|Type], Verb) :- [gstem],g(Ca, Cb, Cc, Type, Verb, []). g(Ca, Cb, Cc, ['Preterite'|Type], Verb, Suff) :- gpret(Ca, Cb, Cc, Type, Verb, Suff). gpret(Ca, Cb, Cc, [‘First Aleph’|Type], Verb, Suff) :- fstwgpret(Ca, Cb, Cc, Verb, Suff, Type). fstweakgpred([@], Cb, Cc, [3, c, s]) --> [ii], Cb, vs, Cc. • A = @ B = p C = s Type = ['G', 'Preterite', 'First Aleph', 3, c, s] ACL-02

  11. Rule Count • The body of the parser consists of 601 DCG rules: • 21 Vowel rules • 4 String-to-PlNF • 47 Suffix • Remaining 529 in the stem definitions: • 239 - G-Stem • 193 - D-Stem • 93 - N-Stem ACL-02

  12. DCG Rules • Simple: • fstweakgpred([@], Cb, Cc, [3, c, s]) --> [ii], Cb, vs, Cc. • Derivative • fstweakgpred([@], Cb, Cc, [2, f, s])--> fstweakgpred([w], Cb, Cc, [2, m, s]), [ii]. • Complex • ndur([Ca], Cb, Cc, ['Third Weak'|Type], Verb, Suff) :-trdwgdur([Ca,Ca], Cb, Cc, Type, Verb, Suff). ACL-02

  13. Overview • Akkadian • Prolog • Parsing using Prolog • Java and web interface • Examples ACL-02

  14. Flow • Web forms send data to parseAkk class • parseAkk reformats data, sends to akkadian class, executes Prolog code ACL-02

  15. Extra Java Features • * expansion for parsing ACL-02

  16. More Java Features • ‘Any’ keyword for generation • Problems: • Generates all possible vowel variations • Adds the -ma suffix • Can create large files [prs, Any] ACL-02

  17. Overview • Akkadian • Prolog • Parsing using Prolog • Java and web interface • Examples ACL-02

  18. Parsing Examples ?- verb(A,B,C,T, [i,p,r,u,s]). A = p B = r C = s T = ['G', 'Preterite', 3, c, s] ; ?- verb(p,r,s,[‘G’,’Preterite’, 2,c,p],Plnf). Plnf = [t, a, p, r, a, s, aa] ; Plnf = [t, a, p, r, e, s, aa] ; Plnf = [t, a, p, r, i, s, aa] ; Plnf = [t, a, p, r, u, s, aa] ; ?- verb(p,r,s,[S,’Preterite’, 2,c,p],Plnf). ACL-02

  19. Stem = 'G' P = [i, p, r, a, s] ; Stem = 'G' P = [i, p, r, e, s] ; Stem = 'G' P = [i, p, r, i, s] ; Stem = 'G' P = [i, p, r, u, s] ; Stem = 'D' P = [u, p, a, r, r, i, s] ; Stem = 'N’ P = [i, p, p, a, r, i, s] ; Stem = 'N' P = [i, p, p, e, r, i, s] ; Stem = 'N' P = [i, p, p, i, r, i, s] ; Stem = 'N' P = [i, p, p, u, r, i, s] ; Examples 2 ACL-02

  20. Suffix Examples • imhur$inaati • G Preterite 3 c s Accusative 3 f p • iddin$inaa$im • d-d-n--G Preterite 3 c s Dative 3 f p • n-d-n--G Preterite First N 3 c s Dative 3 f p • @-d-n--G Durative First Aleph 3 c s Dative 3 f p • w-d-n--G Durative First W Stative 3 c s Dative 3 f p • n-d-n--G Precative First N 3 c s Dative 3 f p • @-d-n--D Imperative First Weak 2 m s Davie 3 f p ACL-02

  21. Web Examples ACL-02

More Related