TinySegmenter is a Clojure library which splits Japanese into words. This is needed because the Japanese stubbornly refuse to use the spacebar.
This library is just a Clojure port of the TinySegmenter javascript library by Taku Kudo (taku@chasen.org). This version is based on the Python 3 version of TinySegmenter
The library only exports a single function segment
, which takes a string (or any char sequence) as an argument.
(require '[tinysegmenter.core :refer [segment]])
(= (segment "私の名前はFelixです")
["私" "の" "名前" "は" "Felix" "です"])
TinySegmenter is available on Clojars
Leiningen
[com.github.funkschy/tinysegmenter "0.1.0"]
Clojure CLI/deps.edn
com.github.funkschy/tinysegmenter {:mvn/version "0.1.0"}
This project is distributed under the BSD 3 License, just like the original version by Taku Kudo. See the LICENSE file for more information.