;; Transfer rules for Chinese to English
;; Version 2
;;updated 4/2/13
;; Langauge names are optional
Chinese (Chinese)English (English)
;; ----------------------------------------
;; Default POS rules for OOV
;; ----------------------------------------
;; Template
;; Affix, POS, Features
;; All rules that apply will be used
;; Special rule with "affix" DEFAULT will be
;; used only if no others are used
DEFAULT, N, =SING \A\d+\Z, NUM, =PLUR
;;transfer
;;get rid of the particle that indicates past tense
;;SWITCH ORDERS OF ADV
(PP) V NP (ADV)
;;transfer
;;need to insert article 'the'
[DET,the] N
;;transfer
;;Switch orders of ADV
;;go school->go to school
(PP) (NEG) V [P,to] NP (ADV) =to
;;transfer
;;Switch orders of ADV
;;go school->go to school
(PP) V [P,to] NP (ADV)=to
;;transfer
;;'do'-insertion in negatives
;;ADV IS ALREADY SWITCHED TO ENGLISH WORD ORDER,THIS IS AFTER THE 'TO' INSERTION IN THE
;;CASE WHERE IT APPLIED. IN DOING SO, ADV ORDER IS SWITCHED IN THE 'TO' INSERTION IN
;;SENTENCES WITHOUT THE NEG AS WELL.
[AUX,do] NEG V (P) NP (ADV)=PRESENT
;;transfer
;;'do'-insertion in negatives, WITH ADV ORDER SWITCH. THIS IS THE CASE WHERE 'TO-
;;INSERTION' DOES NOT APPLY,THEREFORE HAS TO SWITCH IN THIS STEP IN THE CASE OF NEG.
[AUX,do] NEG V (P) NP (ADV)=PRESENT
;;transfer
;;'did'-insertion in negatives
[AUX,did] NEG V (P) NP (ADV)=PAST
;;transfer
;;'did'-insertion in negatives
[AUX,did] NEG V (P) NP (ADV)=PAST
;;transfer
;;'does'-insertion in negatives
[AUX,does] NEG V (P) NP (ADV)=PRESENT=3
;;transfer
;;'does'-insertion in negatives
[AUX,does] NEG V (P) NP (ADV)=PRESENT=3
;;NP transfer rules
(DET) (Q) (AP) N
;;transfer rules: insert BE for non-verbal sentences
(ADV) NP [V,am] AP=1=SING=PRESENT NP [V,am] AP=1=SING
;;transfer rules: insert BE for non-verbal sentences
(ADV) NP [V,is] AP=3=SING=PRESENT NP [V,is] AP=3=SING
;;transfer rules: insert BE for non-verbal sentences
(ADV) NP [V,are] AP=plural=PRESENT NP [V,are] AP=plural NP [V,are] AP=SING=2
;;transfer rules: insert BE for non-verbal sentences
(ADV) NP [V,was] AP=SING=PAST
;;transfer rules: insert BE for non-verbal sentences
(ADV) NP [V,were] AP=plural=PAST
;;post processing
;; Capitalize first word of sentence
\A(\W*)(\w)$1\u$2
;;To be able to parse a period in the end of the sentence.
([\.\!\?])\s*\Z $1