[irstlm] 68/146: Added a bash completion file for irstlm.

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:37:09 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 56933220a1aeb2d563fea9908071134bd470732f
Author: Giulio Paci <giuliopaci at gmail.com>
Date:   Sun Jan 13 03:42:57 2013 +0100

    Added a bash completion file for irstlm.
---
 debian/scripts/irstlm.completion | 81 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/debian/scripts/irstlm.completion b/debian/scripts/irstlm.completion
new file mode 100644
index 0000000..28215c3
--- /dev/null
+++ b/debian/scripts/irstlm.completion
@@ -0,0 +1,81 @@
+# Debian GNU/Linux irstlm completion
+# Copyright 2013 Giulio Paci <giuliopaci at gmail.com>
+# License Expat
+
+_irstlm_get_cmds()
+{
+    echo "help ngt tlm dict plsa build-lm-qsub sort-lm build-sublm compile-lm lm-stat score-lm quantize-lm split-ngt goograms2ngrams merge-sublm interpolate-lm add-start-end build-lm ngram-split prune-lm split-dict rm-start-end ";
+}
+
+_irstlm()
+{
+	local cur conns
+    
+	[ -r /etc/ppp/peers/ ] || return 0
+
+	COMPREPLY=()
+	cur=${COMP_WORDS[$COMP_CWORD]}
+
+	if [ $COMP_CWORD -eq 1 ]; then
+	    conns="$(_irstlm_get_cmds)"
+	    COMPREPLY=( $(compgen -o filenames -W "$conns" -- $cur) )
+	elif [ $COMP_CWORD -eq 2 ] && [[ ${COMP_WORDS[1]}  = "help" ]]; then
+	    conns="$(_irstlm_get_cmds)"
+	    COMPREPLY=( $(compgen -o filenames -W "$conns" -- $cur) )
+	elif [ $COMP_CWORD -ge 2 ] ; then
+	    case ${COMP_WORDS[1]} in
+	     	"ngt")
+			    COMPREPLY=( $(compgen -o filenames -W "-Dictionary= -d= -IntSymb= -is= -NgramSize= -n= -InputFile= -i= -OutputFile= -o= -InputGoogleFormat= -gooinp= -OutputGoogleFormat= -gooout= -SaveBinaryTable= -b= -LmTable= -lm= -DistCo= -dc= -AugmentFile= -aug= -SaveSingle= -ss= -SubDict= -sd= -ConvDict= -cd= -FilterDict= -fd= -FilterTable= -ft= -ftr= -FilterTableRate= -HistoMask= -hm= -InpLen= -il= -tlm= -ftlm -memuse= -iknstat= " -- $cur) )
+			    ;;
+	     	"tlm")
+			    COMPREPLY=( $(compgen -o filenames -W "-Back-off= -bo= -Dictionary= -d= -DictionaryUpperBound= -dub= -NgramSize= -n= -Ngram= -TrainOn= -tr= -oASR= -oasr= -o= -oARPA= -oarpa= -oBIN= -obin= -TestOn= -te= -AdaptOn= -ad= -AdaptRate= -ar= -AdaptLevel= -al= -AdaptOOV= -ao= -SaveScaleFactor= -ssf= -LanguageModelType= -lm= -Interactive= -i= -Statistics= -s= -PruneThresh= -p= -PruneSingletons= -ps= -PruneTopSingletons= -pts= -ComputeLMSize= -sz= -MaximumCachingLevel= -mcl= -MemoryMap= -mem [...]
+			    ;;
+	     	"dict")
+			    COMPREPLY=( $(compgen -o filenames -W "-o= -f= -sort= -pf= -pr= -is= -c= -cs= -t= -LoadFactor= -listOOV= " -- $cur) )
+			    ;;
+	     	"plsa")
+			    COMPREPLY=( $(compgen -o filenames -W "-Dictionary= -d= -Binary= -b= -SplitData= -sd= -Collection= -c= -Model= -m= -HFile= -hf= -WFile= -wf= -TFile= -tf= -CombineTFile= -ct= -TxtFile= -txt= -Inference= -inf= -Features= -f= -Topics= -t= -SpecialTopic= -st= -Iterations= -it= -Help= -h= " -- $cur) )
+			    ;;
+	     	"sort-lm")
+			    COMPREPLY=( $(compgen -o filenames -W "-ilm -olm -inv " -- $cur) )
+			    ;;
+	     	"build-sublm")
+			    COMPREPLY=( $(compgen -o filenames -W "--size --ngrams --sublm --freq-shift --witten-bell --kneser-ney --improved-kneser-ney --good-turing --prune-singletons --cross-sentence --verbose " -- $cur) )
+			    ;;
+	     	"compile-lm")
+			    COMPREPLY=( $(compgen -o filenames -W "--text -t --invert -i --filter -f --keepunigrams -ku --eval -e --randcalls -r --dub --score -s --debug -d --sentence --memmap -mm --ngram_load_factor --dict_load_factor --level -l --tmpdir " -- $cur) )
+			    ;;
+	     	"lm-stat")
+			    COMPREPLY=( $(compgen -o filenames -W "--lm --txt " -- $cur) )
+			    ;;
+	     	"score-lm")
+			    COMPREPLY=( $(compgen -o filenames -W "-lm -dub -level -mm " -- $cur) )
+			    ;;
+	     	"goograms2ngrams")
+			    COMPREPLY=( $(compgen -o filenames -W "--maxsize --startfrom --googledir --ngramdir --verbose " -- $cur) )
+			    ;;
+	     	"merge-sublm")
+			    COMPREPLY=( $(compgen -o filenames -W "--size --sublm --lm " -- $cur) )
+			    ;;
+	     	"interpolate-lm")
+			    COMPREPLY=( $(compgen -o filenames -W "--learn -l --order -o --eval -e --dub --score -s --debug -d --sentence --memmap -mm --ngram_load_factor --dict_load_factor --level -lev " -- $cur) )
+			    ;;
+	     	"prune-lm")
+			    COMPREPLY=( $(compgen -o filenames -W "--threshold= --abs= " -- $cur) )
+			    ;;
+	     	"split-dict")
+			    COMPREPLY=( $(compgen -o filenames -W "--input --output --parts " -- $cur) )
+			    ;;
+
+		*)
+		    ;;
+	    esac
+	fi
+
+	return 0
+}
+
+complete -o bashdefault -o default -o nospace -F _irstlm irstlm
+
+
+# vim:ft=sh:

-- 
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