Skip to content

Commit d0a5334

Browse files
committed
Check in a workflow and a janky demo
1 parent ee2402b commit d0a5334

File tree

17 files changed

+2330
-2079
lines changed

17 files changed

+2330
-2079
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy demo
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions-rs/toolchain@v1
11+
with:
12+
toolchain: stable
13+
target: wasm32-unknown-unknown
14+
15+
- uses: jetli/[email protected]
16+
- uses: jetli/[email protected]
17+
18+
- uses: actions/checkout@v2
19+
20+
- run: cd parser_demo && trunk build --release
21+
22+
- uses: peaceiris/actions-gh-pages@v3
23+
if: github.ref == 'refs/heads/main'
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: ./public

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ resolver = "2"
33
members = [
44
"airmail",
55
"airmail_parser",
6+
"parser_demo",
67
]

airmail_parser/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ edition = "2021"
66
[dependencies]
77
deunicode = "1.4.2"
88
fst = { version = "0.4.7", features = ["levenshtein"] }
9-
hashlink = "0.9.0"
10-
inventory = "0.3.14"
9+
lru = "0.12.1"
1110
lazy_static = "1.4.0"
1211
log = "0.4.20"
1312
nom = "7.1.3"

airmail_parser/build.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,26 @@ fn main() {
8686
],
8787
&[],
8888
);
89+
// We need a synonym system.
8990
helper.build_fst(
9091
"dicts/en/wof_localities.txt",
9192
"dicts/en/wof_localities.fst",
9293
&[],
93-
&[],
94+
&[
95+
("saint", "st"),
96+
("north", "n"),
97+
("south", "s"),
98+
("east", "e"),
99+
("west", "w"),
100+
("northwest", "nw"),
101+
("northeast", "ne"),
102+
("southwest", "sw"),
103+
("southeast", "se"),
104+
("north-west", "nw"),
105+
("north-east", "ne"),
106+
("south-west", "sw"),
107+
("south-east", "se"),
108+
],
94109
);
95110
helper.build_fst(
96111
"dicts/en/wof_regions.txt",

0 commit comments

Comments
 (0)