From 9b7dffcf17dc90613bdc3c0dd6dcc427ecf1862d Mon Sep 17 00:00:00 2001 From: uakci Date: Wed, 6 Sep 2023 11:08:58 +0200 Subject: [PATCH] =?UTF-8?q?treewide:=20aP,=20nP=20=E2=86=92=20=F0=9D=98=A2?= =?UTF-8?q?P,=20=F0=9D=98=AFP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/grammar.ts | 4 ++-- src/latex.ts | 2 ++ src/semantics/denote.ts | 4 ++-- src/serial.ts | 4 ++-- src/toaq.ne | 4 ++-- src/tree.ts | 8 ++++---- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/grammar.ts b/src/grammar.ts index 24190a7..34ebd41 100644 --- a/src/grammar.ts +++ b/src/grammar.ts @@ -108,8 +108,8 @@ const grammar: Grammar = { {"name": "DP", "symbols": [(lexer.has("pronoun") ? {type: "pronoun"} : pronoun)], "postprocess": makeLeaf('DP')}, {"name": "DP", "symbols": ["D", "nP"], "postprocess": makeBranch('DP')}, {"name": "DP", "symbols": ["Focus", "DP"], "postprocess": makeBranch('FocusP')}, - {"name": "nP", "symbols": ["nP", "CPrel"], "postprocess": makeBranch('nP')}, - {"name": "nP", "symbols": ["CPdet"], "postprocess": makeBranchCovertLeft('nP', 'n')}, + {"name": "nP", "symbols": ["nP", "CPrel"], "postprocess": makeBranch('𝘯P')}, + {"name": "nP", "symbols": ["CPdet"], "postprocess": makeBranchCovertLeft('𝘯P', '𝘯')}, {"name": "Clause", "symbols": ["term", "Bi", "Clause"], "postprocess": make3L('TopicP', "Topic'")}, {"name": "Clause", "symbols": ["MTP"], "postprocess": id}, {"name": "Clause", "symbols": ["DP", "Na", "CPrelna"], "postprocess": make3L('𝘷P', "𝘷'")}, diff --git a/src/latex.ts b/src/latex.ts index 35b02ec..ae416be 100644 --- a/src/latex.ts +++ b/src/latex.ts @@ -58,6 +58,8 @@ export function toDocument(trees: (Tree | DTree)[]): string { %\\newunicodechar{ꝡ}{w\\hspace{-5pt}\\clipbox{0pt 0pt 0pt 4.3pt}{y}} \\newunicodechar{Ꝡ}{W\\hspace{-4.9pt}\\clipbox{0pt 0pt 0pt 4pt}{y}} \\newunicodechar{ꝡ}{w\\hspace{-4.2pt}\\clipbox{0pt 0pt 0pt 4pt}{y}} +\\newunicodechar{𝘢}{$a$} +\\newunicodechar{𝘯}{$n$} \\newunicodechar{𝘷}{$v$} \\usetikzlibrary{arrows.meta} \\tikzset{>={Stealth[width=2mm,length=2mm]}} diff --git a/src/semantics/denote.ts b/src/semantics/denote.ts index bc7e4b2..6f31bca 100644 --- a/src/semantics/denote.ts +++ b/src/semantics/denote.ts @@ -523,7 +523,7 @@ function denoteLeaf(leaf: Leaf, cCommand: StrictTree | null): DTree { } else if (leaf.label === 'D') { denotation = boundThe; bindings = boundTheBindings; - } else if (leaf.label === 'n') { + } else if (leaf.label === '𝘯') { if (cCommand === null) throw new Impossible("Can't denote an n in isolation"); const vp = findVp(cCommand); @@ -815,7 +815,7 @@ function getCompositionRule(left: DTree, right: DTree): CompositionRule { switch (left.label) { case 'V': case 'Asp': - case 'n': + case '𝘯': case 'Q': return functionalApplication; case 'T': diff --git a/src/serial.ts b/src/serial.ts index 1d83d26..5473e1c 100644 --- a/src/serial.ts +++ b/src/serial.ts @@ -133,8 +133,8 @@ function attachAdjective(VP: Tree, vP: Tree): Tree { label: 'VP', left: VP, right: { - label: 'aP', - left: makeNull('a'), // TODO ki- + label: '𝘢P', + left: makeNull('𝘢'), // TODO ki- right: { // TODO: oh god, adjectives can have T and Asp? // needs rework in nearley grammar diff --git a/src/toaq.ne b/src/toaq.ne index 987a753..6b0919b 100644 --- a/src/toaq.ne +++ b/src/toaq.ne @@ -58,9 +58,9 @@ DP -> D nP {% makeBranch('DP') %} # kú jí DP -> Focus DP {% makeBranch('FocusP') %} # (sá) ꝡë hao -nP -> nP CPrel {% makeBranch('nP') %} +nP -> nP CPrel {% makeBranch('𝘯P') %} # (sá) ∅ hao -nP -> CPdet {% makeBranchCovertLeft('nP', 'n') %} +nP -> CPdet {% makeBranchCovertLeft('𝘯P', '𝘯') %} # ní bï pu hao Clause -> term Bi Clause {% make3L('TopicP', "Topic'") %} diff --git a/src/tree.ts b/src/tree.ts index 328e910..5d53bc9 100644 --- a/src/tree.ts +++ b/src/tree.ts @@ -34,8 +34,8 @@ export type Label = | '&' | "&'" | '&P' - | 'a' - | 'aP' + | '𝘢' + | '𝘢P' | 'Adjunct' | 'AdjunctP' | 'Asp' @@ -66,8 +66,8 @@ export type Label = | 'ModalP' | 'mu' | 'muP' - | 'n' - | 'nP' + | '𝘯' + | '𝘯P' | 'Q' | 'QP' | 'SA'