homebrew-core/Formula/yamcha.rb
BrewTestBot 95884bae22 Formula files style updates.
Closes Homebrew/homebrew#42407.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 14:21:42 +01:00

58 lines
1.6 KiB
Ruby

class Yamcha < Formula
desc "NLP text chunker using Support Vector Machines"
homepage "http://chasen.org/~taku/software/yamcha/"
url "http://chasen.org/~taku/software/yamcha/src/yamcha-0.33.tar.gz"
sha256 "413d4fc0a4c13895f5eb1468e15c9d2828151882f27aea4daf2399c876be27d5"
bottle do
sha1 "7ba7244f3d95d350ee13686492d04267090cf024" => :yosemite
sha1 "5900e590dad8c01bb3598bdd0cb512f929130646" => :mavericks
sha1 "4f7d40d5d02e0a431486450d119e83564f795a70" => :mountain_lion
end
depends_on "tinysvm"
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
system "make", "install"
end
test do
libexecdir = shell_output("#{bin}/yamcha-config --libexecdir").chomp
assert_equal libexecdir, "#{libexec}/yamcha"
(testpath/"train.data").write <<-EOS.undent
He PRP B-NP
reckons VBZ B-VP
the DT B-NP
current JJ I-NP
account NN I-NP
deficit NN I-NP
will MD B-VP
narrow VB I-VP
to TO B-PP
only RB B-NP
# # I-NP
1.8 CD I-NP
billion CD I-NP
in IN B-PP
September NNP B-NP
. . O
He PRP B-NP
reckons VBZ B-VP
..
EOS
system "make", "-j", "1",
"-f", "#{libexecdir}/Makefile",
"CORPUS=train.data", "MODEL=case_study", "train"
%w[log model se svmdata txtmodel.gz].each do |ext|
assert File.exist? testpath/"case_study.#{ext}"
end
end
end