2010-03-21 16:13:34 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class StanfordParser < Formula
|
2010-03-21 16:13:34 +00:00
|
|
|
homepage 'http://nlp.stanford.edu/software/lex-parser.shtml'
|
2012-07-10 06:11:54 +00:00
|
|
|
url 'http://nlp.stanford.edu/software/stanford-parser-2012-07-09.tgz'
|
|
|
|
sha1 'd5c0ea5f974d0e2776321b1aaab85647c908dd51'
|
|
|
|
version '2.0.3'
|
2010-03-21 16:13:34 +00:00
|
|
|
|
|
|
|
def shim_script target_script
|
2012-02-10 06:15:51 +00:00
|
|
|
<<-EOS.undent
|
|
|
|
#!/bin/bash
|
|
|
|
exec "#{libexec}/#{target_script}" "$@"
|
|
|
|
EOS
|
2010-03-21 16:13:34 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install Dir['*']
|
2012-02-10 06:15:51 +00:00
|
|
|
Dir["#{libexec}/*.sh"].each do |f|
|
2010-03-21 16:13:34 +00:00
|
|
|
f = File.basename(f)
|
|
|
|
(bin+f).write shim_script(f)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-02-10 06:15:51 +00:00
|
|
|
system "#{bin}/lexparser.sh", "#{libexec}/data/testsent.txt"
|
2010-03-21 16:13:34 +00:00
|
|
|
end
|
|
|
|
end
|