Skip to content

Commit

Permalink
Merge pull request #746 from Speech-Rule-Engine/refactor/collapse_gra…
Browse files Browse the repository at this point in the history
…mmar

Simplifies grammar markup for collapsed elements.
  • Loading branch information
zorkow authored Jan 16, 2024
2 parents 0719c81 + 620d8a5 commit 8f0458c
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ IEMAPS_FILE = $(IEMAPS_PKG)/mathmaps_ie.json
LOCALES = $(notdir $(wildcard $(JSON_SRC)/*)) ## $(foreach dir, $(MAPS), $(JSON_SRC)/$(dir))
LOC_DST = $(addprefix $(JSON_DST)/, $(addsuffix .json,$(LOCALES)))

JSON_MINIFY = npx json-minify
JSON_MINIFY = pnpm json-minify

### Intermediate minified locale files for faster building
MINI_DIR = $(abspath ./minimaps)
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/af/rules/clearspeak_afrikaans_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"opgesom\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"opgesom\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/af/rules/mathspeak_afrikaans_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"opgesom\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"opgesom\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/ca/rules/mathspeak_catalan_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[n] . (engine:modality=summary, grammar:collapsed); [t] \"plegat\""
"[n] . (engine:modality=summary, grammar:?collapsed); [t] \"plegat\""
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/da/rules/mathspeak_danish_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"sammenfoldet\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"sammenfoldet\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/de/rules/clearspeak_german_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[n] . (engine:modality=summary, grammar:collapsed); [t] \"kollabiert\""
"[n] . (engine:modality=summary, grammar:?collapsed); [t] \"kollabiert\""
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/de/rules/mathspeak_german_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[n] . (engine:modality=summary, grammar:collapsed); [t] \"kollabiert\""
"[n] . (engine:modality=summary, grammar:?collapsed); [t] \"kollabiert\""
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/en/rules/chromevox_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"collapsed\"; [n] . (engine:modality=summary,grammar:collapsed)"
"[t] \"collapsed\"; [n] . (engine:modality=summary,grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/en/rules/clearspeak_english_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"collapsed\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"collapsed\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/en/rules/mathspeak_english_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"collapsed\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"collapsed\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/es/rules/mathspeak_spanish_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[n] . (engine:modality=summary, grammar:collapsed); [t] \"plegado\""
"[n] . (engine:modality=summary, grammar:?collapsed); [t] \"plegado\""
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/hi/rules/clearspeak_hindi_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"संकुचित\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"संकुचित\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/hi/rules/mathspeak_hindi_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"निपातित\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"निपातित\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
4 changes: 2 additions & 2 deletions mathmaps/ko/rules/clearspeak_korean_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"여닫기\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"여닫기\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down Expand Up @@ -1369,4 +1369,4 @@
"simple",
"unit"
]
}
}
2 changes: 1 addition & 1 deletion mathmaps/ko/rules/mathspeak_korean_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"여닫기\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"여닫기\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/nb/rules/clearspeak_bokmal_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapset\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapset\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/nb/rules/mathspeak_bokmal_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapset\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapset\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/nn/rules/clearspeak_nynorsk_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapsa\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapsa\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/nn/rules/mathspeak_nynorsk_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapsa\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapsa\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/sv/rules/clearspeak_swedish_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapsad\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapsad\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
2 changes: 1 addition & 1 deletion mathmaps/sv/rules/mathspeak_swedish_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"Action",
"collapsed",
"[t] \"kollapsad\"; [n] . (engine:modality=summary, grammar:collapsed)"
"[t] \"kollapsad\"; [n] . (engine:modality=summary, grammar:?collapsed)"
],
[
"Action",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"commonjs": "pnpm tsc --module commonjs --outDir cjs --moduleResolution node",
"postcommonjs": "node -e 'require(\"fs\").writeFileSync(\"cjs/package.json\", \"{\\n \\\"type\\\": \\\"commonjs\\\"\\n}\\n\");'",
"module": "pnpm tsc --module nodenext --outDir js --moduleResolution nodenext",
"postmodule": "node -e 'require(\"fs\").writeFileSync(\"js/package.json\", \"{\\n \\\"type\\\": \\\"module\\\"\\n}\\n\");'",
"pretest": "git submodule update --remote --merge; pnpm run compile; cd sre-tests; ln -s .. speech-rule-engine; npm install",
"compile": "pnpm run module",
"clean": "rimraf js lib cjs",
Expand Down

0 comments on commit 8f0458c

Please sign in to comment.