From 9c09c62a00aad211484e23940e70ab8dfe1ea65c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 3 Nov 2019 21:37:30 +0100 Subject: stats: Word stats+LatinIME renderer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add word stats (well, tokens seperated by non-letter symbols really, but that’s alright) and dumping into an LatinIME-compatible dictionary file (for Android). --- gen.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'gen.sh') diff --git a/gen.sh b/gen.sh index df59e57..3500b22 100755 --- a/gen.sh +++ b/gen.sh @@ -40,13 +40,12 @@ rule render-xmodmap rule analyze-heat command = lulua-analyze -l \$layout keyheatmap < \$in > \$out -# XXX: add lulua-analyze combine here rule write-bbcarabic - command = find \$in -type f | lulua-write bbcarabic \$layout > \$out + command = find \$in -type f | lulua-write bbcarabic \$layout | lulua-analyze combine > \$out pool = write rule write-aljazeera - command = find \$in -type f | lulua-write aljazeera \$layout > \$out + command = find \$in -type f | lulua-write aljazeera \$layout | lulua-analyze combine > \$out pool = write rule write-epub @@ -73,6 +72,9 @@ rule letterfreq rule analyze-fingerhand command = lulua-analyze -l \$layout fingerhand < \$in > \$out +rule wordlist + command = lulua-analyze -l ar-lulua latinime < \$in > \$out + rule cpp command = gcc -E -x c -nostdinc -MMD -MF \$out.d -C -P -I \$docdir/_temp \$in -o \$out depfile = \$out.d @@ -81,6 +83,9 @@ rule cpp rule cp command = cp \$in \$out +rule gz + command = gzip -c \$in > \$out + ### build targets ### build \$docdir/_build: mkdir build \$docdir/_build/fonts: mkdir @@ -89,6 +94,9 @@ build \$docdir/_build/index.html: cpp \$docdir/index.html || \$docdir/_build build \$docdir/_build/letterfreq.json: letterfreq \$statsdir/ar-lulua/all.pickle || \$docdir/_build build \$docdir/_build/style.css: cp \$docdir/style.css || \$docdir/_build build \$docdir/_build/lulua-logo.svg: cp \$docdir/lulua-logo.svg || \$docdir/_build +# wordlist +build \$docdir/_temp/lulua.combined: wordlist \$statsdir/ar-lulua/all.pickle || \$docdir/_temp +build \$docdir/_build/lulua.combined.gz: gz \$docdir/_temp/lulua.combined || \$docdir/_build build \$docdir/_build/fonts/IBMPlexArabic-Regular.woff2: cp \$fontdir/IBMPlexArabic-Regular.woff2 || \$docdir/_build/fonts -- cgit v1.2.3