aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authormt32010-03-21 09:13:34 -0700
committerAdam Vandenberg2010-06-30 12:20:42 -0700
commit24af190e475dbc2ab16beedbd7b8e9ec58984db6 (patch)
treec463b6408936ec3652c374734124762338cb4b72 /Library
parentd7b565bb6e99e3f5eb4aeffca76aa3fb948c0c7e (diff)
downloadhomebrew-24af190e475dbc2ab16beedbd7b8e9ec58984db6.tar.bz2
Add formula for the Stanford Parser
Signed-off-by: Adam Vandenberg <flangy@gmail.com> * Install privately to libexec * Link .csh scripts into bin * Includes a smoke test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/stanford-parser.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Formula/stanford-parser.rb b/Library/Formula/stanford-parser.rb
new file mode 100644
index 000000000..6059f69ad
--- /dev/null
+++ b/Library/Formula/stanford-parser.rb
@@ -0,0 +1,27 @@
+require 'formula'
+
+class StanfordParser <Formula
+ url 'http://nlp.stanford.edu/software/stanford-parser-2010-02-26.tgz'
+ homepage 'http://nlp.stanford.edu/software/lex-parser.shtml'
+ md5 '25e26c79d221685956d2442592321027'
+ version '1.6.2'
+
+ def shim_script target_script
+ <<-EOS
+#!/bin/bash
+exec "#{libexec}/#{target_script}" $@
+EOS
+ end
+
+ def install
+ libexec.install Dir['*']
+ Dir["#{libexec}/*.csh"].each do |f|
+ f = File.basename(f)
+ (bin+f).write shim_script(f)
+ end
+ end
+
+ def test
+ system "lexparser.csh", "#{libexec}/testsent.txt"
+ end
+end