homebrew-core/Formula/sentencepiece.rb
Andrew Kane 8bc540834a sentencepiece 0.1.84 (new formula)
Closes #46853.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
2019-11-18 21:47:27 -05:00

22 lines
650 B
Ruby

class Sentencepiece < Formula
desc "Unsupervised text tokenizer and detokenizer"
homepage "https://github.com/google/sentencepiece"
url "https://github.com/google/sentencepiece/archive/v0.1.84.tar.gz"
sha256 "7f5505bd46aa5103ad235d61c269932c5922e68597eb484a9d27faed6af1419f"
depends_on "cmake" => :build
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make"
system "make", "install"
end
pkgshare.install "data"
end
test do
cp (pkgshare/"data/botchan.txt"), testpath
system "#{bin}/spm_train", "--input=botchan.txt", "--model_prefix=m", "--vocab_size=1000"
end
end