Skip to content

Commit

Permalink
Parse gö
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Sep 5, 2023
1 parent 005cf44 commit 505c2cb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ declare var determiner: any;
declare var incorporated_determiner: any;
declare var event_accessor: any;
declare var focus_particle: any;
declare var retroactive_cleft: any;
declare var interjection: any;
declare var name_verb: any;
declare var text_quote: any;
Expand Down Expand Up @@ -51,6 +52,7 @@ const {
makeOptLeaf,
makePrefixLeaf,
makePrefixP,
makeRetroactiveCleft,
makeRose,
makeRose2,
makeSerial,
Expand Down Expand Up @@ -114,6 +116,7 @@ const grammar: Grammar = {
{"name": "Clause", "symbols": ["DP", "Na", "CPrelna"], "postprocess": make3L('𝘷P', "𝘷'")},
{"name": "Clause", "symbols": ["ModalP", "Na", "MTP"], "postprocess": make3L('𝘷P', "𝘷'")},
{"name": "ModalP", "symbols": ["ModalT4", "CPsub"], "postprocess": makeBranch('ModalP')},
{"name": "Clause", "symbols": ["MTP", "Go", "Clause"], "postprocess": makeRetroactiveCleft},
{"name": "MTP", "symbols": ["TP1"], "postprocess": id},
{"name": "MTP", "symbols": ["Modal", "TP1"], "postprocess": makeT1ModalvP},
{"name": "MTP", "symbols": ["Sigma", "Modal", "TP1"], "postprocess": makeSigmaT1ModalvP},
Expand Down Expand Up @@ -211,6 +214,7 @@ const grammar: Grammar = {
{"name": "Dincorp", "symbols": [(lexer.has("incorporated_determiner") ? {type: "incorporated_determiner"} : incorporated_determiner)], "postprocess": makeLeaf('D')},
{"name": "EvA", "symbols": [(lexer.has("event_accessor") ? {type: "event_accessor"} : event_accessor)], "postprocess": makeLeaf('EvA')},
{"name": "Focus", "symbols": [(lexer.has("focus_particle") ? {type: "focus_particle"} : focus_particle)], "postprocess": makeLeaf('Focus')},
{"name": "Go", "symbols": [(lexer.has("retroactive_cleft") ? {type: "retroactive_cleft"} : retroactive_cleft)], "postprocess": makeLeaf('𝘷')},
{"name": "Interjection", "symbols": [(lexer.has("interjection") ? {type: "interjection"} : interjection)], "postprocess": makeLeaf('Interjection')},
{"name": "Mi", "symbols": [(lexer.has("name_verb") ? {type: "name_verb"} : name_verb)], "postprocess": makeLeaf('mı')},
{"name": "Mo", "symbols": [(lexer.has("text_quote") ? {type: "text_quote"} : text_quote)], "postprocess": makeLeaf('mo')},
Expand Down
4 changes: 4 additions & 0 deletions src/toaq.ne
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const {
makeOptLeaf,
makePrefixLeaf,
makePrefixP,
makeRetroactiveCleft,
makeRose,
makeRose2,
makeSerial,
Expand Down Expand Up @@ -71,6 +72,8 @@ Clause -> DP Na CPrelna {% make3L('𝘷P', "𝘷'") %}
# shê ꝡä hao nä jıa hao
Clause -> ModalP Na MTP {% make3L('𝘷P', "𝘷'") %}
ModalP -> ModalT4 CPsub {% makeBranch('ModalP') %}
# hao jí gö hao jí
Clause -> MTP Go Clause {% makeRetroactiveCleft %}

# "MTP" is a TP that can have a t1 modal in front.

Expand Down Expand Up @@ -188,6 +191,7 @@ D -> %determiner {% makeLeaf('D') %}
Dincorp -> %incorporated_determiner {% makeLeaf('D') %}
EvA -> %event_accessor {% makeLeaf('EvA') %}
Focus -> %focus_particle {% makeLeaf('Focus') %}
Go -> %retroactive_cleft {% makeLeaf('𝘷') %}
Interjection -> %interjection {% makeLeaf('Interjection') %}
Mi -> %name_verb {% makeLeaf('') %}
Mo -> %text_quote {% makeLeaf('mo') %}
Expand Down
16 changes: 16 additions & 0 deletions src/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,19 @@ export function makePrefixP([prefix, verb]: [Tree, Tree]) {
right: verb,
};
}

export function makeRetroactiveCleft([tp, vgo, clause]: [Tree, Tree, Tree]) {
return {
label: '𝘷P',
left: { label: 'CP', left: { label: 'C', word: 'covert' }, right: tp },
right: {
label: "𝘷'",
left: vgo,
right: {
label: 'CPrel',
left: { label: 'C', word: 'covert' },
right: clause,
},
},
};
}

0 comments on commit 505c2cb

Please sign in to comment.