Skip to content

Commit 9817d2e

Browse files
committed
Matrix update (2014-08-22)
1 parent 21f89ba commit 9817d2e

File tree

18 files changed

+2178
-1426
lines changed

18 files changed

+2178
-1426
lines changed

cmn/hans/lkb/globals.lsp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@
4242
;;;
4343
;;; input characters to be ignored (i.e. suppressed) in tokenization
4444
;;;
45+
;;; Note that these might not be the same as in pet/pet.set, which could
46+
;;; cause parsing results from PET and LKB to differ.
47+
;;;
4548
(defparameter *punctuation-characters*
4649
(append
47-
'(#\space #\! #\" #\& #\(
48-
#\) #\* #\+ #\, #\. #\/ #\;
49-
#\< #\> #\? #\@ #\[ #\\ #\] #\^
50-
#\_ #\` #\{ #\| #\} #\~)
50+
'(#\space #\! #\" #\& #\' #\( #\)
51+
#\* #\+ #\, #\ #\. #\/ #\\ #\;
52+
#\< #\> #\? #\@ #\[ #\] #\^ #\`
53+
#\{ #\| #\} #\~)
5154
#+:ics
5255
'(#\ideographic_full_stop #\fullwidth_question_mark
5356
#\horizontal_ellipsis #\fullwidth_full_stop

cmn/hans/lkb/mrsglobals.lisp

100755100644
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,15 @@
9191

9292
(setf *sem-relation-suffix* "_rel")
9393
(setf *rel-name-path* `(,(vsym "PRED") ))
94+
95+
;;;
96+
;;; MWG 2013-05-16: adding to allow generation with [incr tsdb()]
97+
;;;
98+
99+
(setf *show-lnk-p* nil)
100+
101+
;;;
102+
;;; MWG 2013-05-21: block the LKB's default var type mappings (use the SEMI)
103+
;;;
104+
105+
(setf *variable-type-mapping* :semi)

cmn/hans/pet/global.set

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
;;; -*- Mode: TDL; -*-
2+
3+
; NOTE: The following special-name-* types are duplicated in flop.set,
4+
; so they have been commented out here to avoid Cheap warnings.
15
;; definition of names of types with a special meaning to PET
2-
special-name-top := "*top*".
3-
special-name-symbol := "string".
4-
special-name-string := "string".
5-
special-name-cons := "cons".
6-
special-name-list := "list".
7-
special-name-nil := "null".
8-
special-name-difflist := "diff-list".
9-
10-
;; same for attributes
11-
special-name-attr-first := "FIRST".
12-
special-name-attr-rest := "REST".
13-
special-name-attr-list := "LIST".
14-
special-name-attr-last := "LAST".
15-
special-name-attr-args := "ARGS".
6+
;special-name-top := "*top*".
7+
;special-name-symbol := "string".
8+
;special-name-string := "string".
9+
;special-name-cons := "cons".
10+
;special-name-list := "list".
11+
;special-name-nil := "null".
12+
;special-name-difflist := "diff-list".
13+
;
14+
;;; same for attributes
15+
;special-name-attr-first := "FIRST".
16+
;special-name-attr-rest := "REST".
17+
;special-name-attr-list := "LIST".
18+
;special-name-attr-last := "LAST".
19+
;special-name-attr-args := "ARGS".
1620

1721
;; status values that marks rules
1822
rule-status-values := rule.
File renamed without changes.

cmn/hans/pet/mrs.set

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
;;; -*- Mode: TDL; -*-
2+
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
;;; SSH 2012-02-06 This file largely taken from Jacy defines the MRS
5+
;;; interface, in order to have the customized grammars work with pet
6+
;;; off the shelf. Now, we can just use the flop and cheap command
7+
;;; directly without adding something into the customized grammars.
8+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9+
10+
;; mrs::*sem-relation-suffix*
11+
mrs-relation-suffix := "_rel".
12+
13+
;; mrs::*rel-cfrom-feature*
14+
mrs-rel-cfrom-feature := CFROM.
15+
16+
;; mrs::*rel-cto-feature*
17+
mrs-rel-cto-feature := CTO.
18+
19+
;; mrs::*value-feats*
20+
mrs-value-feats := CARG.
21+
22+
;; mrs::*feat-priority-list*
23+
mrs-feat-priority-list := LTOP INDEX LBL ARG0 ARG1 ARG2 ARG3 RSTR BODY MARG CARG.
24+
25+
;; mrs::*ignored-sem-features*
26+
mrs-ignored-sem-features := IDIOMP LNK WLINK PARAMS CFROM CTO --PSV.
27+
28+
;; mrs::*ignored-extra-features*
29+
mrs-ignored-extra-features := SORT INSTLOC.
30+
31+
;; mrs::*initial-semantics-path*
32+
mrs-initial-semantics-path := "SYNSEM.LOCAL.CONT".
33+
34+
;; mrs::*main-semantics-path*
35+
mrs-main-semantics-path := "SYNSEM.LOCAL.CONT.RELS.LIST".
36+
37+
;; mrs::*construction-semantics-path*
38+
mrs-construction-semantics-path := "C-CONT.RELS.LIST".
39+
40+
;; mrs::*psoa-top-h-path*
41+
;;mrs-psoa-top-h-path := "HOOK.LTOP".
42+
;; for message-less grammars
43+
mrs-psoa-top-h-path := "".
44+
45+
;; mrs::*psoa-index-path*
46+
mrs-psoa-index-path := "HOOK.INDEX".
47+
48+
;; mrs::*psoa-event-path*;; doesn't seem to be used
49+
;;mrs-psoa-event-path := "HOOK.INDEX".
50+
51+
;; mrs::*psoa-liszt-path*
52+
mrs-psoa-liszt-path := "RELS.LIST".
53+
54+
;; mrs::*psoa-rh-cons-path*
55+
mrs-psoa-rh-cons-path := "HCONS.LIST".
56+
57+
;; mrs::*rel-handel-path*
58+
mrs-rel-handel-path := LBL.
59+
60+
;; mrs::*sc-arg-feature*
61+
mrs-sc-arg-feature := HARG.
62+
63+
;; mrs::*outscpd-feature*
64+
mrs-outscpd-feature := LARG.
65+
66+
;; mrs::*bv-feature*
67+
mrs-bv-feature := ARG0.
68+
69+
;; mrs::*scope-feat*
70+
mrs-scope-feat := BODY.
71+
72+
;; mrs::*top-semantics-type*
73+
mrs-top-semantics-type := "predsort".
74+
75+
;; mrs::*rel-name-path*
76+
mrs-rel-name-path := PRED.
77+
78+
;; mrs::*root-path*
79+
mrs-root-path := ROOT.
80+
81+
;; mrs::*false-type*
82+
mrs-false-type := "-".
83+
84+
;; mrs::*true-type*
85+
mrs-true-type := "+".
86+
87+
;; mrs::*dummy-relations*
88+
mrs-dummy-relations := .
89+
90+
;; mrs::*event-type*
91+
mrs-event-type := event.
92+
93+
;; mrs::*event_or_index-type*
94+
mrs-event-or-index-type := individual.
95+
96+
;; mrs::*deg-ind-type*
97+
mrs-deg-ind-type := deg-ind.
98+
99+
;; mrs::*non_expl-ind-type*
100+
mrs-non-expl-ind-type := non_expl-ind.
101+
102+
;; mrs::*handle-type*
103+
mrs-handle-type := handle.
104+
105+
;; mrs::*ref-ind-type*
106+
mrs-ref-ind-type := ref-ind.
107+
108+
;; mrs::*non_event-type*
109+
mrs-non-event-type := non_event.
110+
111+
;; priority list for sorting extra-pairs of variables
112+
;; not available in LKB, set according to the ordering in semi.vpm
113+
mrs-extra-priority-list := PERS NUM GEND IND DIV PRONTYPE TENSE MOOD PROG PERF SF.
114+

cmn/hans/test_sentences

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
张三 叫 了。
2+
张三 追赶 了 李四。
File renamed without changes.

cmn/hant/pet/hant-pet.set

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
;;;; settings for CHEAP -*- Mode: TDL; Coding: utf-8 -*-
2+
include "flop".
3+
include "pet".

lrules.tdl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
;;; -*- Mode: TDL; Coding: utf-8 -*-
2+
13
pred-adj-lex-rule := attr-to-pred-adj-lex-rule.
24
pred-adj-asp-lex-rule := attr-to-pred-adj-aspect-lex-rule.
35
vp-ellipsis-lex-rule := vp-aux-ellipsis-lex-rule.

0 commit comments

Comments
 (0)