jumanpp 1.01 (new formula)
Closes #5875. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
199bbd686c
commit
ceb9680c6d
1 changed files with 37 additions and 0 deletions
37
Formula/jumanpp.rb
Normal file
37
Formula/jumanpp.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
class Jumanpp < Formula
|
||||
desc "Japanese Morphological Analyzer based on RNNLM"
|
||||
homepage "http://nlp.ist.i.kyoto-u.ac.jp/EN/index.php?JUMAN%2B%2B"
|
||||
url "http://lotus.kuee.kyoto-u.ac.jp/nl-resource/jumanpp/jumanpp-1.01.tar.xz"
|
||||
sha256 "0d587416a3eb7123638f9c1e30a649b72dfb483448839168dcb48be572c5919a"
|
||||
|
||||
depends_on "boost"
|
||||
depends_on "boost-build"
|
||||
depends_on "gperftools"
|
||||
|
||||
patch do
|
||||
# This problem is resolved on upstream: https://github.com/ku-nlp/jumanpp/commit/4cabe0fb0ff28d0176a11f40b959e224eccc541e
|
||||
# After 1.02 will be released, this patch should be removed.
|
||||
url "https://gist.githubusercontent.com/chezou/076cb9c407de729ad2e2d04749f07f3e/raw/8115a2dfca48e9f9f5aee12cea39377238c5110f/jumanpp-Makefilein.patch"
|
||||
sha256 "f7a2b222ea74625d9ccfe62d61d2808a828669463b6cad509aef95de7537ebc9"
|
||||
end
|
||||
|
||||
def install
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
ENV["LANG"] = "C.UTF-8" # prevent "invalid byte sequence in UTF-8" on sierra build
|
||||
system bin/"jumanpp", "--version"
|
||||
|
||||
output = <<-EOI.undent
|
||||
こんにち こんにち こんにち 名詞 6 時相名詞 10 * 0 * 0 "代表表記:今日/こんにち カテゴリ:時間"
|
||||
は は は 助詞 9 副助詞 2 * 0 * 0 NIL
|
||||
EOS
|
||||
EOI
|
||||
|
||||
assert_match output, pipe_output(bin/"jumanpp", "echo こんにちは")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue