Skip to content

Commit a122deb

Browse files
committed
Update README
1 parent 14dd7f4 commit a122deb

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ build/
22
node_modules/
33
output.*
44
/*.png
5+
!pipeline.png
56
dist
67

78
# Downloaded by src/scripts/build-data.ts

README.md

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Kuna
22

33
Kuna is a software suite for parsing Toaq Delta. It can translate Toaq into box
4-
diagrams, syntax trees, logic formulas, and more.
5-
6-
The word _kuna_ /ˈkʰuːna/ is Toaq for "sentence."
4+
diagrams, syntax trees, logic formulas, and more. The word _kuna_ /ˈkʰuːna/ is
5+
Toaq for "sentence."
76

87
## Using Kuna
98

@@ -55,3 +54,29 @@ export KUNA_TOKEN=your.discord.bot.token
5554
npm install
5655
npm run bot
5756
```
57+
58+
## How Kuna works
59+
60+
![pipeline overview](pipeline.png)
61+
62+
1. The input text is tokenized by `src/morphology/tokenize.ts`.
63+
2. The token stream is parsed by a context-free grammar for surface-level Toaq,
64+
defined in `src/toaq.kuna.ne`.
65+
3. A
66+
[logical form](https://toaqlanguage.wordpress.com/2022/09/26/logical-language-misconceptions/)
67+
tree is recovered by `src/syntax/recover.ts`. This involves undoing
68+
[syntactic movement](https://en.wikipedia.org/wiki/Syntactic_movement) and
69+
adding scope information to the tree.
70+
4. This tree can be interpreted/denoted by the code in `src/semantics` to
71+
produce a semantic representation (formula).
72+
5. The various modules in `src/modes` can transform, annotate, consume, or
73+
display these results.
74+
75+
## Useful commands
76+
77+
- `npm run data:build` downloads all English definitions from Toadua and guesses
78+
glosses and frames, storing the result in `data/toadua/toadua.json`.
79+
- The result is checked into version control for convenience, but we can run
80+
this every once in a while to teach Kuna new words.
81+
- `npm run codegen` converts `src/toaq.kuna.ne` to `src/toaq.ne`. This runs
82+
automatically after `npm install`.

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<meta charset="utf-8" />
55
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<meta name="theme-color" content="#000000" />
7+
<meta name="theme-color" content="#477eeb" />
88
<meta name="description" content="Tool for analyzing Toaq text" />
9-
<title>Kuna</title>
9+
<title>kuna</title>
1010
<script type="module" src="/src/web/index.tsx"></script>
1111

1212
<link

pipeline.png

314 KB
Loading

0 commit comments

Comments
 (0)