hangul syllables

This commit is contained in:
2026-02-12 09:45:52 -07:00
parent 0ba6518630
commit fd36692419
8 changed files with 197 additions and 81 deletions

12
scripts/search-hangul Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bb
(require '[babashka.fs :as fs]
'[clojure.string :as str])
(doseq [f (fs/glob "lab1/grammar/korean" "**.gf")
[line-number line] (map-indexed (fn [i x] [i x])
(-> f str slurp str/split-lines))]
(when (re-find #"\p{block=HangulJamo}" line)
(printf "JAMO: %s:%d: %s\n" (str f) line-number line))
(when (re-find #"\p{block=HangulSyllables}" line)
(printf "SYLLABLE: %s:%d: %s\n" (str f) line-number line)))