[irstlm] 30/146: Removed upstream_revision_487.patch.

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:37:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

giuliopaci-guest pushed a commit to branch master
in repository irstlm.

commit 55a0704ed54cd69233ca4cbc14d539686b273eb9
Author: Giulio Paci <giuliopaci at gmail.com>
Date:   Tue Sep 4 03:47:08 2012 +0200

    Removed upstream_revision_487.patch.
---
 debian/patches/upstream_revision_487.patch | 405 -----------------------------
 1 file changed, 405 deletions(-)

diff --git a/debian/patches/upstream_revision_487.patch b/debian/patches/upstream_revision_487.patch
deleted file mode 100644
index bc286d8..0000000
--- a/debian/patches/upstream_revision_487.patch
+++ /dev/null
@@ -1,405 +0,0 @@
-Description: upstream changes since SVN revision 487
-Origin: upstream, https://irstlm.svn.sourceforge.net/svnroot/irstlm/trunk
-Forwarded: not-needed
-Applied-Upstream: revision 487, https://irstlm.svn.sourceforge.net/svnroot/irstlm/trunk
---- a/scripts/add-start-end.sh
-+++ b/scripts/add-start-end.sh
-@@ -1,4 +1,4 @@
--#! /bin/sh
-+#! /bin/bash
- 
- #adds sentence start/end symbols to standard input and 
- #trims words longer than 80 characters
---- a/scripts/build-lm-qsub.sh
-+++ b/scripts/build-lm-qsub.sh
-@@ -1,4 +1,4 @@
--##! /bin/sh
-+#! /bin/bash
- 
- usage()
- {
-@@ -13,7 +13,7 @@
-    -o      Output gzipped LM, e.g. lm.gz
-    -k      Number of splits (default 5)
-    -n      Order of language model (default 3)
--   -t      Directory for temporary files (default ./stat)
-+   -t      Directory for temporary files (default ./stat_PID)
-    -p      Prune singleton n-grams (default false)
-    -u      Use uniform word frequency for dictionary splitting (default false)
-    -q      parameters for qsub ("-q <queue>", and any other)
-@@ -40,6 +40,8 @@
- #paths to scripts and commands in irstlm
- scr=$IRSTLM/bin
- bin=$IRSTLM/bin
-+gzip=`which gzip 2> /dev/null`;
-+gunzip=`which gunzip 2> /dev/null`;
- 
- #check irstlm installation
- if [ ! -e $bin/dict -o  ! -e $scr/split-dict.pl ]; then
-@@ -49,7 +51,7 @@
- 
- #default parameters
- logfile=/dev/null
--tmpdir=stat$$
-+tmpdir=stat_$$
- order=3
- parts=3
- inpfile="";
-@@ -109,7 +111,7 @@
-                      ;;
- 	     *) 
- 		 echo "wrong smoothing setting";
--		 exiti 4;
-+		 exit 4;
- 	     esac
-              ;;
-          p)
-@@ -132,8 +134,8 @@
- done
- 
- 
--if [ $verbose ];then
--echo inpfile=\"$inpfile\" outfile=$outfile order=$order parts=$parts tmpdir=$tmpdir prune=$prune smoothing=$smoothing dictionary=$dictionary
-+if [ $verbose ]; then
-+echo inpfile=\"$inpfile\" outfile=$outfile order=$order parts=$parts tmpdir=$tmpdir prune=$prune smoothing=$smoothing dictionary=$dictionary verbose=$verbose
- fi
- 
- if [ ! "$inpfile" -o ! "$outfile" ]; then
-@@ -152,17 +154,20 @@
- fi
- 
- #check tmpdir
-+tmpdir_created=0;
- if [ ! -d $tmpdir ]; then
--   echo "Temporary directory $tmpdir not found";
-+   echo "Temporary directory $tmpdir does not exist";
-    echo "creating $tmpdir";
-    mkdir -p $tmpdir;
-+   tmpdir_created=1;
- else
--    echo "Cleaning temporary directory $tmpdir";
--    rm $tmpdir/dict* $tmpdir/ngram.dict.* $tmpdir/lm.dict.* $tmpdir/ikn.stat.dict.* 2> /dev/null
-+   echo "Cleaning temporary directory $tmpdir";
-+   rm -r $tmpdir 2> /dev/null
-+   if [ $? != 0 ]; then
-+      echo "Warning: some temporary files could not be removed"
-+   fi
- fi
- 
--
--
- workingdir=`pwd | perl -pe 's/\/nfsmnt//g'`
- cd $workingdir
- 
-@@ -198,13 +203,16 @@
- 
- unset getpids
- echo "Extracting n-gram statistics for each word list"
-+echo "Important: dictionary must be ordered according to order of appearance of words in data"
-+echo "used to generate n-gram blocks,  so that sub language model blocks results ordered too"
-+
- for sfx in ${suffix[@]} ; do
- 
- (\
- qsub $queueparameters -b no -j yes -sync no -o $qsubout.$sfx -e $qsuberr.$sfx -N $qsubname-$sfx << EOF
- cd $workingdir
- echo exit status $?
--$bin/ngt -i="$inpfile" -n=$order -gooout=y -o="gzip -c > $tmpdir/ngram.dict.${sfx}.gz" -fd="$tmpdir/dict.${sfx}" $dictionary -iknstat="$tmpdir/ikn.stat.dict.${sfx}" 
-+$bin/ngt -i="$inpfile" -n=$order -gooout=y -o="$gzip -c > $tmpdir/ngram.dict.${sfx}.gz" -fd="$tmpdir/dict.${sfx}" $dictionary -iknstat="$tmpdir/ikn.stat.dict.${sfx}" 
- echo exit status $?
- echo
- EOF
-@@ -237,7 +245,7 @@
- cd $workingdir
- echo exit status $?
- 
--$scr/build-sublm.pl $verbose $prune $smoothing "cat $tmpdir/ikn.stat.dict*" --size $order --ngrams "gunzip -c $tmpdir/ngram.dict.${sfx}.gz" -sublm $tmpdir/lm.dict.${sfx}  
-+$scr/build-sublm.pl $verbose $prune $smoothing "cat $tmpdir/ikn.stat.dict*" --size $order --ngrams "$gunzip -c $tmpdir/ngram.dict.${sfx}.gz" -sublm $tmpdir/lm.dict.${sfx}  
- echo exit status $?
- 
- echo
-@@ -258,7 +266,7 @@
- cd $workingdir
- echo exit status $?
- 
--$scr/build-sublm.pl $verbose $prune $smoothing --size $order --ngrams "gunzip -c $tmpdir/ngram.dict.${sfx}.gz" -sublm $tmpdir/lm.dict.${sfx}  
-+$scr/build-sublm.pl $verbose $prune $smoothing --size $order --ngrams "$gunzip -c $tmpdir/ngram.dict.${sfx}.gz" -sublm $tmpdir/lm.dict.${sfx}  
- 
- echo
- EOF
-@@ -292,9 +300,16 @@
- ) 2>&1 > $qsublog
- 
- echo "Cleaning temporary directory $tmpdir";
--rm -r $tmpdir 2> /dev/null
-+rm $tmpdir/* 2> /dev/null
- rm $qsubout* $qsuberr* $qsublog* 2> /dev/null
- 
--exit
-+if [ $tmpdir_created -eq 1 ]; then
-+    echo "Removing temporary directory $tmpdir";
-+    rmdir $tmpdir 2> /dev/null
-+    if [ $? != 0 ]; then
-+        echo "Warning: the temporary directory could not be removed."
-+    fi
-+fi
- 
-+exit 0
- 
---- a/scripts/build-lm.sh
-+++ b/scripts/build-lm.sh
-@@ -1,4 +1,6 @@
--#! /bin/sh
-+#! /bin/bash
-+
-+set -m # Enable Job Control
- 
- usage()
- {
-@@ -13,7 +15,7 @@
-    -o      Output gzipped LM, e.g. lm.gz
-    -k      Number of splits (default 5)
-    -n      Order of language model (default 3)
--   -t      Directory for temporary files (default ./stat)
-+   -t      Directory for temporary files (default ./stat_PID)
-    -p      Prune singleton n-grams (default false)
-    -u      Use uniform word frequency for dictionary splitting (default false)
-    -s      Smoothing methods: witten-bell (default), kneser-ney, improved-kneser-ney
-@@ -30,7 +32,7 @@
- fi
- 
- #paths to scripts and commands in irstlm
--scr=$IRSTLM/bin/
-+scr=$IRSTLM/bin
- bin=$IRSTLM/bin
- gzip=`which gzip 2> /dev/null`;
- gunzip=`which gunzip 2> /dev/null`;
-@@ -43,7 +45,7 @@
- 
- #default parameters
- logfile=/dev/null
--tmpdir=stat
-+tmpdir=stat_$$
- order=3
- parts=3
- inpfile="";
-@@ -143,13 +145,18 @@
- fi
- 
- #check tmpdir
-+tmpdir_created=0;
- if [ ! -d $tmpdir ]; then
--   echo "Temporary directory $tmpdir not found";
-+   echo "Temporary directory $tmpdir does not exist";
-    echo "creating $tmpdir";
-    mkdir -p $tmpdir;
-+   tmpdir_created=1;
- else
--    echo "Cleaning temporary directory $tmpdir";
--    rm $tmpdir/dict* $tmpdir/ngram.dict.* $tmpdir/lm.dict.* $tmpdir/ikn.stat.* 2> /dev/null
-+   echo "Cleaning temporary directory $tmpdir";
-+    rm $tmpdir/* 2> /dev/null
-+    if [ $? != 0 ]; then
-+        echo "Warning: some temporary files could not be removed"
-+    fi
- fi
- 
- 
-@@ -166,9 +173,11 @@
- for sdict in $tmpdir/dict.*;do
- sdict=`basename $sdict`
- echo $sdict;
--$bin/ngt -i="$inpfile" -n=$order -gooout=y -o="$gzip -c > $tmpdir/ngram.${sdict}.gz" -fd="$tmpdir/$sdict" $dictionary  -iknstat="$tmpdir/ikn.stat.$sdict" >> $logfile 2>&1
-+$bin/ngt -i="$inpfile" -n=$order -gooout=y -o="$gzip -c > $tmpdir/ngram.${sdict}.gz" -fd="$tmpdir/$sdict" $dictionary  -iknstat="$tmpdir/ikn.stat.$sdict" >> $logfile 2>&1 &
- done
- 
-+# Wait for all parallel jobs to finish
-+while [ 1 ]; do fg 2> /dev/null; [ $? == 1 ] && break; done
- 
- echo "Estimating language models for each word list"
- for sdict in `ls $tmpdir/dict.*` ; do
-@@ -176,20 +185,32 @@
- echo $sdict;
- 
- if [ $smoothing = "--kneser-ney" -o $smoothing = "--improved-kneser-ney" ]; then
--$scr/build-sublm.pl $verbose $prune $smoothing "cat $tmpdir/ikn.stat.dict.*" --size $order --ngrams "$gunzip -c $tmpdir/ngram.${sdict}.gz" -sublm $tmpdir/lm.$sdict  >> $logfile #2>&1
-+$scr/build-sublm.pl $verbose $prune $smoothing "cat $tmpdir/ikn.stat.dict.*" --size $order --ngrams "$gunzip -c $tmpdir/ngram.${sdict}.gz" -sublm $tmpdir/lm.$sdict  >> $logfile 2>&1 &
- else
--$scr/build-sublm.pl $verbose $prune $smoothing  --size $order --ngrams "$gunzip -c $tmpdir/ngram.${sdict}.gz" -sublm $tmpdir/lm.$sdict  >> $logfile #2>&1
-+$scr/build-sublm.pl $verbose $prune $smoothing  --size $order --ngrams "$gunzip -c $tmpdir/ngram.${sdict}.gz" -sublm $tmpdir/lm.$sdict  >> $logfile 2>&1 &
- fi
- 
- done
- 
-+# Wait for all parallel jobs to finish
-+while [ 1 ]; do fg 2> /dev/null; [ $? == 1 ] && break; done
-+
- echo "Merging language models into $outfile"
- $scr/merge-sublm.pl --size $order --sublm $tmpdir/lm.dict -lm $outfile  >> $logfile 2>&1
- 
- echo "Cleaning temporary directory $tmpdir";
--rm $tmpdir/dict* $tmpdir/ngram.dict.* $tmpdir/lm.dict.* $tmpdir/ikn.stat.dict.* 2> /dev/null
-+rm $tmpdir/* 2> /dev/null
-+
-+if [ $tmpdir_created -eq 1 ]; then
-+    echo "Removing temporary directory $tmpdir";
-+    rmdir $tmpdir 2> /dev/null
-+    if [ $? != 0 ]; then
-+        echo "Warning: the temporary directory could not be removed."
-+    fi
-+fi
-+ 
-+exit 0
-+
-+
- 
--echo "Removing temporary directory $tmpdir";
--rmdir $tmpdir 2> /dev/null
- 
--exit
---- a/scripts/rm-start-end.sh
-+++ b/scripts/rm-start-end.sh
-@@ -1,6 +1,6 @@
--#! /bin/sh
-+#! /bin/bash
- 
--#rm star-end symbols
-+#rm start-end symbols
- 
- sed 's/<s>//g' | sed 's/<\/s>//g' | sed 's/^ *//' | sed 's/ *$//' | sed '/^$/d'
- 
---- a/scripts/split-ngt.sh
-+++ b/scripts/split-ngt.sh
-@@ -1,4 +1,4 @@
--#! /bin/sh
-+#! /bin/bash
- 
- #usage:
- #ngt-split.sh <input> <output> <size> <parts>
---- a/src/lmtable.h
-+++ b/src/lmtable.h
-@@ -44,7 +44,7 @@
- #define MIN(a,b) (((a)<(b))?(a):(b))
- 
- #define LMTMAXLEV  20
--#define MAX_LINE  1024
-+#define MAX_LINE  100000
- 
- #ifndef  LMTCODESIZE
- #define  LMTCODESIZE  (int)3
---- a/src/plsa.cpp
-+++ b/src/plsa.cpp
-@@ -54,6 +54,7 @@
- 	char *featurefile=NULL;
- 	char *basefile=NULL;
- 	char *hfile=NULL;
-+	char *tmphfile=NULL;
- 	char *tfile=NULL;
- 	char *wfile=NULL;
- 	char *ctfile=NULL;
-@@ -83,8 +84,8 @@
- 				  "Model", CMDSTRINGTYPE, &basefile,
- 				  "m", CMDSTRINGTYPE, &basefile,
- 				  
--				  "HFile", CMDSTRINGTYPE, &hfile,
--				  "hf", CMDSTRINGTYPE, &hfile,
-+				  "HFile", CMDSTRINGTYPE, &tmphfile,
-+				  "hf", CMDSTRINGTYPE, &tmphfile,
- 				  
- 				  "WFile", CMDSTRINGTYPE, &wfile,
- 				  "wf", CMDSTRINGTYPE, &wfile,
-@@ -119,6 +120,7 @@
- 				  (char *)NULL
- 				  );
- 	
-+
- 	GetParams(&argc, &argv, (char*) NULL);
- 	
- 	if (argc==1 || help){
-@@ -170,9 +172,14 @@
- 		exit(1);
-     }
- 	
--	if (!hfile){
-+	if (!tmphfile){
- 		//set default value
--		 strcpy(hfile,"hfff");
-+		hfile=new char[4+1];
-+		strcpy(hfile,"hfff");
-+	}else{
-+		//set the value of the parameter
-+		hfile=new char[strlen(tmphfile)+1];
-+		strcpy(hfile,tmphfile);
- 	}
- 
- 	dictionary dict(dictfile);
-@@ -219,6 +226,7 @@
- 		tc.train(adafile,it,.0);
- 	}
- 	if (strcmp(hfile,"hfff")==0)  system("rm -f hfff");
-+	delete hfile;
- 	
- 	exit(1); 
- }
---- a/src/quantize-lm.cpp
-+++ b/src/quantize-lm.cpp
-@@ -31,7 +31,7 @@
- #include "math.h"
- #include "util.h"
- 
--#define MAX_LINE 1024
-+#define MAX_LINE 100000
- 
- //----------------------------------------------------------------------
- //  Special type and global variable for the BIN CLUSTERING algorithm
---- a/src/util.h
-+++ b/src/util.h
-@@ -27,7 +27,7 @@
- 
- 
- #define LMTMAXLEV  20
--#define MAX_LINE  1024
-+#define MAX_LINE  100000
- 
- std::string gettempfolder();
- void createtempfile(std::ofstream  &fileStream, std::string &filePath, std::ios_base::openmode flags);
---- a/config.h.in
-+++ b/config.h.in
-@@ -33,6 +33,10 @@
- /* Define to 1 if you have the <unistd.h> header file. */
- #undef HAVE_UNISTD_H
- 
-+/* Define to the sub-directory in which libtool stores uninstalled libraries.
-+   */
-+#undef LT_OBJDIR
-+
- /* Name of package */
- #undef PACKAGE
- 
-@@ -48,6 +52,9 @@
- /* Define to the one symbol short name of this package. */
- #undef PACKAGE_TARNAME
- 
-+/* Define to the home page for this package. */
-+#undef PACKAGE_URL
-+
- /* Define to the version of this package. */
- #undef PACKAGE_VERSION
- 
---- a/regenerate-makefiles.sh
-+++ b/regenerate-makefiles.sh
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- 
- # NOTE:
- # Versions 1.9 (or higher) of aclocal and automake are required.
-@@ -14,7 +14,7 @@
- force=$1;
- # set parameter force to the value "--force" if you want to recreate all links to the autotools
- 
--function die () {
-+die () {
-   echo "$@" >&2
-   exit 1
- }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git



More information about the debian-science-commits mailing list