forked from GitHub/comp-syntax-gu-mlt
hangul syllables
This commit is contained in:
12
scripts/search-hangul
Executable file
12
scripts/search-hangul
Executable 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)))
|
||||
Reference in New Issue
Block a user