Skip to content

Commit

Permalink
the initial transfer grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
sanghoun committed Sep 24, 2014
1 parent d5d1e66 commit f5529f0
Show file tree
Hide file tree
Showing 36 changed files with 3,686 additions and 51 deletions.
63 changes: 12 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,54 +1,15 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# C extensions
*.so
# Compile Grammar images
*.dat
*.grm

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
21 changes: 21 additions & 0 deletions basis/ace/config.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
transfer := yes.

grammar-top := "top.tdl".

input-vpm := "../in.vpm".
output-vpm := "../out.vpm".

top-type := top.
semarg-type := u.
list-type := list.
cons-type := cons.
null-type := null.
diff-list-type := diff-list.

mrs-rels-list := RELS.
mrs-hcons-list := HCONS.

invent-ltop := no.
hook-path := .

enable-icons := yes.
11 changes: 11 additions & 0 deletions basis/ace/top.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:begin :type.
:include "../../mrs.tdl".
:include "../../mtr.tdl".
:include "../../predicates.tdl".
:include "../../predicates.erg.tdl".
:include "../types.tdl".
:end :type.

:begin :instance :status rule.
:include "../test.mtr".
:end :instance.
16 changes: 16 additions & 0 deletions basis/in.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
E.TENSE : TENSE
* >> *

PNG.NUM : NUM
* >> *

;PERSON : PERSON
; * >> *

;NUMBER : NUMBER
; * >> *

;GENDER : GENDER
; * >> *


7 changes: 7 additions & 0 deletions basis/input.mrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[ LTOP: h0
INDEX: e1 [ e SORT: semsort SF: prop-or-ques E.TENSE: present ]
RELS: < [ "exist_q_rel"<-1:-1> LBL: h3 ARG0: x2 [ x SORT: semsort PERSON: 3rd NUMBER: sg GENDER: gender ] RSTR: h4 BODY: h5 ]
[ "_dog_n_rel"<-1:-1> LBL: h6 ARG0: x2 ]
[ "_bark_v_rel"<-1:-1> LBL: h7 ARG0: e1 ARG1: x2 ] >
HCONS: < h4 qeq h6 >
ICONS: < e1 focus x2 e1 info-str e1 > ]
17 changes: 17 additions & 0 deletions basis/out.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
TENSE : E.TENSE
* >> *

NUM : PNG.NUM
* >> *

;PERSON : PERSON
; * >> *

;NUMBER : NUMBER
; * >> *

;GENDER : GENDER
; * >> *

PNG : PNG
* >> *
11 changes: 11 additions & 0 deletions basis/test.mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;cat_tmp_rule := monotonic_mtr &
;[ INPUT.RELS < [ PRED "_cat_n_rel" ] >,
; OUTPUT.RELS < +copy+ & [ PRED "_tmp_n_rel" ] > ].

;dog_cat_rule := monotonic_mtr &
;[ INPUT.RELS < [ PRED "_dog_n_rel" ] >,
; OUTPUT.RELS < +copy+ & [ PRED "_cat_n_rel" ] > ].

;tmp_dog_rule := monotonic_mtr &
;[ INPUT.RELS < [ PRED "_tmp_n_rel" ] >,
; OUTPUT.RELS < +copy+ & [ PRED "_dog_n_rel" ] > ].
7 changes: 7 additions & 0 deletions basis/types.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
semsort := u.
tense := top.
present := tense.
prop-or-ques := sforce.
i :+ [ SORT semsort, PERSON person, NUMBER number ].
3rd := person.
x :+ [ GENDER gender ].
21 changes: 21 additions & 0 deletions enin/ace/config.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
transfer := yes.

grammar-top := "top.tdl".

input-vpm := "../in.vpm".
output-vpm := "../out.vpm".

top-type := top.
semarg-type := u.
list-type := list.
cons-type := cons.
null-type := null.
diff-list-type := diff-list.

mrs-rels-list := RELS.
mrs-hcons-list := HCONS.

invent-ltop := no.
hook-path := .

enable-icons := yes.
11 changes: 11 additions & 0 deletions enin/ace/top.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:begin :type.
:include "../../mrs.tdl".
:include "../../mtr.tdl".
:include "../../predicates.tdl".
:include "../../predicates.erg.tdl".
:include "../types.tdl".
:end :type.

:begin :instance :status rule.
:include "../test.mtr".
:end :instance.
17 changes: 17 additions & 0 deletions enin/in.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PERS : PERS
* >> *

NUM : NUM
* >> *

SF : SF
* >> *

TENSE : TENSE
* >> *

SPECI : SPECI
* >> *

COG-ST : COG-ST
* >> *
9 changes: 9 additions & 0 deletions enin/out.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SF : SF
prop >> prop-or-ques

TENSE : ASPECT
past >> perf

PERS NUM : PNG.PERNUM
* * >> pernum

12 changes: 12 additions & 0 deletions enin/test.mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bark_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_bark_v_1_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_menggonggong_v_rel" ] > ].

dog_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_dog_n_1_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_anjing_n_rel" ] > ].

udef_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED _the_q_rel ] >,
OUTPUT.RELS < [ PRED "exist_q_rel" ] > ].

7 changes: 7 additions & 0 deletions enin/types.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
semsort := u.
tense := top.
present := tense.
prop-or-ques := sforce.
i :+ [ SORT semsort, PERSON person, NUMBER number ].
3rd := person.
x :+ [ GENDER gender ].
21 changes: 21 additions & 0 deletions hsja/ace/config.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
transfer := yes.

grammar-top := "top.tdl".

input-vpm := "../in.vpm".
output-vpm := "../out.vpm".

top-type := top.
semarg-type := u.
list-type := list.
cons-type := cons.
null-type := null.
diff-list-type := diff-list.

mrs-rels-list := RELS.
mrs-hcons-list := HCONS.

invent-ltop := no.
hook-path := .

enable-icons := yes.
11 changes: 11 additions & 0 deletions hsja/ace/top.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:begin :type.
:include "../../mrs.tdl".
:include "../../mtr.tdl".
:include "../../predicates.tdl".
:include "../../predicates.erg.tdl".
:include "../types.tdl".
:end :type.

:begin :instance :status rule.
:include "../test.mtr".
:end :instance.
5 changes: 5 additions & 0 deletions hsja/in.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
E.ASPECT : TENSE
perfective >> past

PNG.PERNUM : PERS
* >> 3
6 changes: 6 additions & 0 deletions hsja/out.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TENSE : TENSE
* >> *

PERS : PERS
* >> *

12 changes: 12 additions & 0 deletions hsja/test.mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bark_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_jiao4_v_1_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_hoeru_v_1_rel" ] > ].

dog_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_gou3_n_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_inu_n_rel" ] > ].

udef_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "exist_q_rel" ] >,
OUTPUT.RELS < [ PRED udef_q_rel ] > ].

7 changes: 7 additions & 0 deletions hsja/types.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
semsort := u.
tense := top.
present := tense.
prop-or-ques := sforce.
i :+ [ SORT semsort, PERSON person, NUMBER number ].
3rd := person.
x :+ [ GENDER gender ].
21 changes: 21 additions & 0 deletions inen/ace/config.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
transfer := yes.

grammar-top := "top.tdl".

input-vpm := "../in.vpm".
output-vpm := "../out.vpm".

top-type := top.
semarg-type := u.
list-type := list.
cons-type := cons.
null-type := null.
diff-list-type := diff-list.

mrs-rels-list := RELS.
mrs-hcons-list := HCONS.

invent-ltop := no.
hook-path := .

enable-icons := yes.
11 changes: 11 additions & 0 deletions inen/ace/top.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:begin :type.
:include "../../mrs.tdl".
:include "../../mtr.tdl".
:include "../../predicates.tdl".
:include "../../predicates.erg.tdl".
:include "../types.tdl".
:end :type.

:begin :instance :status rule.
:include "../test.mtr".
:end :instance.
5 changes: 5 additions & 0 deletions inen/in.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ASPECT : TENSE
perf >> past

PNG.PERNUM : PERS NUM
* >> 3 sg
9 changes: 9 additions & 0 deletions inen/out.vpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TENSE : TENSE
* >> *

PERS : PERS
* >> *

NUM : NUM
* >> *

12 changes: 12 additions & 0 deletions inen/test.mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bark_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_menggonggong_v_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_bark_v_1_rel" ] > ].

dog_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "_anjing_n_rel" ] >,
OUTPUT.RELS < +copy+ & [ PRED "_dog_n_1_rel" ] > ].

udef_mtr := monotonic_mtr &
[ INPUT.RELS < [ PRED "exist_q_rel" ] >,
OUTPUT.RELS < [ PRED _the_q_rel ] > ].

7 changes: 7 additions & 0 deletions inen/types.tdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
semsort := u.
tense := top.
present := tense.
prop-or-ques := sforce.
i :+ [ SORT semsort, PERSON person, NUMBER number ].
3rd := person.
x :+ [ GENDER gender ].
Loading

0 comments on commit f5529f0

Please sign in to comment.