Created
April 17, 2014 14:37
-
-
Save query/10988379 to your computer and use it in GitHub Desktop.
Patches to make the ASSERT semantic role tagger install properly on Debian 7.1.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following patch file applies several fixes to the ASSERT v0.14b | |
# software distribution [1] such that the `./install.sh` script works | |
# properly on Debian 7.1. To apply it, use the following commands: | |
# | |
# $ cd assert-v0.14b/ | |
# $ patch -p1 < patch.diff | |
# | |
# [1]: http://cemantix.org/software/assert.html | |
# | |
diff -ur a/bin/extract-propbank-features.csh b/bin/extract-propbank-features.csh | |
--- a/bin/extract-propbank-features.csh 2006-05-29 15:06:13.000000000 -0400 | |
+++ b/bin/extract-propbank-features.csh 2014-04-17 10:01:28.813400331 -0400 | |
@@ -1,6 +1,6 @@ | |
#!/bin/csh | |
-if( $# == 0 ) then | |
+if( $#argv == 0 ) then | |
echo "Usage: extract-propbank-features.csh <file.txt> <passives-file>" | |
exit | |
endif | |
diff -ur a/install.sh b/install.sh | |
--- a/install.sh 2006-05-29 16:09:11.000000000 -0400 | |
+++ b/install.sh 2014-04-17 09:49:37.491692622 -0400 | |
@@ -94,7 +94,7 @@ | |
#--- check the version of python ---# | |
echo -n "checking for python version 2.3... " | |
-if [ `python -V 2>&1| grep '2\.[3-9]'|wc -l| cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+if [ `python -V 2>&1| grep '2\.[3-9]'|wc -l| cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
echo "yes" | |
else | |
@@ -135,7 +135,7 @@ | |
#--- check the version of perl ---# | |
echo -n "checking for perl5..." | |
-if [ `perl -v 2>&1| grep '5\.[68]'|wc -l| cut -c0-7` -eq 1 ] | |
+if [ `perl -v 2>&1| grep '5\.'|wc -l| cut -c1-8` -eq 1 ] | |
then | |
echo "yes" | |
else | |
@@ -162,7 +162,7 @@ | |
yamcha_flag=0 | |
packages/yamcha-0.23/bin/yamcha -V -m models/propbank-arguments.model < samples/ref/test.data.ref > samples/test.svm-scores | |
-if [ `diff samples/test.svm-scores samples/ref/test.svm-scores.ref | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 0 ] | |
+if [ `diff samples/test.svm-scores samples/ref/test.svm-scores.ref | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 0 ] | |
then | |
#--- yamcha works out of the box ---# | |
echo "yes" | |
@@ -179,7 +179,7 @@ | |
echo -n "checking if YamCha works..." | |
packages/yamcha-0.23/bin/yamcha -V -m models/propbank-arguments.model < samples/ref/test.data.ref > samples/test.svm-scores | |
- if [ `diff samples/test.svm-scores samples/ref/test.svm-scores.ref | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 0 ] | |
+ if [ `diff samples/test.svm-scores samples/ref/test.svm-scores.ref | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 0 ] | |
then | |
echo "yes" | |
@@ -199,7 +199,7 @@ | |
echo -n "checking if TinySVM works..." | |
tinysvm_flag=0 | |
-if [ `packages/TinySVM-0.09/bin/svm_learn 2>&1| grep 'TinySVM - tiny SVM package' | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+if [ `packages/TinySVM-0.09/bin/svm_learn 2>&1| grep 'TinySVM - tiny SVM package' | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
#--- TinySVM works out of the box ---# | |
echo "yes" | |
@@ -215,7 +215,7 @@ | |
cd ../.. | |
echo -n "checking if TinySVM works..." | |
- if [ `packages/TinySVM-0.09/bin/svm_learn 2>&1| grep TinySVM | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+ if [ `packages/TinySVM-0.09/bin/svm_learn 2>&1| grep TinySVM | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
echo "yes" | |
tinysvm_flag=1 | |
@@ -236,7 +236,7 @@ | |
echo -n "checking if TGrep2 works..." | |
tgrep2_flag=0 | |
-if [ `packages/Tgrep2/tgrep2 2>&1| grep "Usage" | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+if [ `packages/Tgrep2/tgrep2 2>&1| grep "Usage" | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
#--- TGrep2 works out of the box ---# | |
echo "yes" | |
@@ -250,7 +250,7 @@ | |
cd ../.. | |
echo -n "checking if TGrep2 works..." | |
- if [ `packages/Tgrep2/tgrep2 2>&1| grep "Usage" | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+ if [ `packages/Tgrep2/tgrep2 2>&1| grep "Usage" | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
echo "yes" | |
tgrep2_flag=1 | |
@@ -271,7 +271,7 @@ | |
echo -n "checking if Charniak parser works..." | |
charniak_flag=0 | |
-if [ `packages/CharniakParser/bin/parseStdin 2>&1| grep "error: Need" | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+if [ `packages/CharniakParser/bin/parseStdin 2>&1| grep "error: Need" | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
#--- Charniak Parser works out of the box ---# | |
echo "yes" | |
@@ -287,7 +287,7 @@ | |
cd ../.. | |
echo -n "checking if Charniak parser works..." | |
- if [ `packages/CharniakParser/bin/parseStdin 2>&1| grep "error: Need" | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 1 ] | |
+ if [ `packages/CharniakParser/bin/parseStdin 2>&1| grep "error: Need" | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 1 ] | |
then | |
echo "yes" | |
charniak_flag=1 | |
@@ -419,7 +419,7 @@ | |
cd samples | |
../scripts/assert --tag=argument test.txt > /dev/null | |
- if [ -e test.parses -a `diff test.parses ref/test.parses.ref | wc -l | cut -c0-7 | sed 's/^ *//g'` -eq 0 ] | |
+ if [ -e test.parses -a `diff test.parses ref/test.parses.ref | wc -l | cut -c1-8 | sed 's/^ *//g'` -eq 0 ] | |
then | |
echo "yes, ASSERT works!" | |
rm -rf test.parses | |
diff -ur a/packages/yamcha-0.23/src/chunker.cpp b/packages/yamcha-0.23/src/chunker.cpp | |
--- a/packages/yamcha-0.23/src/chunker.cpp 2006-05-29 15:06:10.000000000 -0400 | |
+++ b/packages/yamcha-0.23/src/chunker.cpp 2014-04-17 09:53:29.087877157 -0400 | |
@@ -24,6 +24,7 @@ | |
#include <vector> | |
#include <stdexcept> | |
#include <string> | |
+#include <cstring> | |
#include <strstream> | |
#include <map> | |
#include <algorithm> | |
diff -ur a/packages/yamcha-0.23/src/param.cpp b/packages/yamcha-0.23/src/param.cpp | |
--- a/packages/yamcha-0.23/src/param.cpp 2006-05-29 15:06:10.000000000 -0400 | |
+++ b/packages/yamcha-0.23/src/param.cpp 2014-04-17 09:53:07.346357822 -0400 | |
@@ -25,6 +25,7 @@ | |
#include <fstream> | |
#include <strstream> | |
#include <cstdio> | |
+#include <cstring> | |
#include "param.h" | |
#include "common.h" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment