22 lines
683 B
Ruby
22 lines
683 B
Ruby
class StanfordCorenlp < Formula
|
|
desc "Java suite of core NLP tools"
|
|
homepage "https://stanfordnlp.github.io/CoreNLP/"
|
|
url "https://nlp.stanford.edu/software/stanford-corenlp-full-2018-02-27.zip"
|
|
version "3.9.1"
|
|
sha256 "5c50ac680c678d07f86ed0494c68307b513829b563e7641b0d95894d7de1701f"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.8+"
|
|
|
|
def install
|
|
libexec.install Dir["*"]
|
|
bin.write_exec_script Dir["#{libexec}/*.sh"]
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.txt").write("Stanford is a university, founded in 1891.")
|
|
system "#{bin}/corenlp.sh", "-annotators tokenize,ssplit,pos", "-file test.txt"
|
|
assert_predicate (testpath/"test.txt.xml"), :exist?
|
|
end
|
|
end
|