Debian Codegraph @

debian/scripts/irstlm.completion

raw
1 # Debian GNU/Linux irstlm completion
2 # Copyright 2013 Giulio Paci <[email protected]>
3 # License LGPL-2.1+
4
5 _irstlm_get_cmds()
6 {
7 echo "help ngram-split rm-start-end mdtsel build-lm sort-lm plsa.sh cswa goograms2ngrams lm-stat merge-sublm interpolate-lm tlm dict plsa score-lm dtsel build-sublm quantize-lm verify-caching build-lm-qsub ngt prune-lm split-dict add-start-end split-ngt compile-lm ";
8 }
9
10 _irstlm()
11 {
12 local cur cmds
13
14 COMPREPLY=()
15 cur=${COMP_WORDS[$COMP_CWORD]}
16
17 if [ $COMP_CWORD -eq 1 ]; then
18 cmds="$(_irstlm_get_cmds)"
19 COMPREPLY=( $(compgen -o filenames -W "$cmds" -- $cur) )
20 elif [ $COMP_CWORD -eq 2 ] && [[ ${COMP_WORDS[1]} = "help" ]]; then
21 cmds="$(_irstlm_get_cmds)"
22 COMPREPLY=( $(compgen -o filenames -W "$cmds" -- $cur) )
23 elif [ $COMP_CWORD -ge 2 ] ; then
24 case ${COMP_WORDS[1]} in
25 "mdtsel")
26 COMPREPLY=( $(compgen -o filenames -W "-v -i -o -s -x -w -j -m -f -n -d -c " -- $cur) )
27 ;;
28 "build-lm")
29 COMPREPLY=( $(compgen -o filenames -W "-i --InputFile -o --OutputFile -k --Parts -n --NgramSize -d --Dictionary -s --LanguageModelType -p --PruneSingletons -f --PruneFrequencyThreshold -t --TmpDir -l --LogFile -u --uniform -b --boundaries -v --verbose -h -? --help " -- $cur) )
30 ;;
31 "sort-lm")
32 COMPREPLY=( $(compgen -o filenames -W "-ilm -olm -tmpdir -inv " -- $cur) )
33 ;;
34 "plsa.sh")
35 COMPREPLY=( $(compgen -o filenames -W "-c -d -f -m -n -i -t -p -k -r -s -l -v -c -d -m -n -u -o -i -t -l -k -v " -- $cur) )
36 ;;
37 "cswa")
38 COMPREPLY=( $(compgen -o filenames -W "--Alignments= --DistBeta= --DistMean= --DistVar= --DistWin= --FixNullProb= --ForceModel= --Iterations= --M1iter= --MinVariance= --Model= --NormalizeVectors= --SrcData= --Threads= --TrainVariances= --TrgData= --TxtModel= --UseNullWord= --Verbosity= --Word2Vec= --al= --db= --dm= --dv= --dw= --fm= --fnp= --it= -m= --m1= --mv= --nv= --sd= --td= --th= --tv= --txt= --unw= -v= --w2v= --DEBUG_LEVEL= " -- $cur) )
39 ;;
40 "goograms2ngrams")
41 COMPREPLY=( $(compgen -o filenames -W "--maxsize --startfrom --googledir --ngramdir --verbose " -- $cur) )
42 ;;
43 "lm-stat")
44 COMPREPLY=( $(compgen -o filenames -W "--lm --txt " -- $cur) )
45 ;;
46 "merge-sublm")
47 COMPREPLY=( $(compgen -o filenames -W "--size --sublm --lm --backoff " -- $cur) )
48 ;;
49 "interpolate-lm")
50 COMPREPLY=( $(compgen -o filenames -W "--DictionaryUpperBound= -d= --debug= --dict_load_factor= --dub= -e= --eval= -l= --learn= --lev= --level= --memmap= --mm= --ngram_load_factor= -o= --order= -s= --score= --sentence= --DEBUG_LEVEL= " -- $cur) )
51 ;;
52 "tlm")
53 COMPREPLY=( $(compgen -o filenames -W "-Help -h --AdaptLevel= --AdaptOOV= --AdaptOn= --AdaptRate= --Back-off= --Beta= --CheckProb= --ComputeLMSize= --Dictionary= --DictionaryUpperBound= --Interactive= --LanguageModelType= --LoadMixParam= --MaximumCachingLevel= --MemoryMap= --Ngram= --NgramSize= --OutProb= --PruneFrequencyThreshold= --PruneSingletons= --PruneThresh= --PruneTopSingletons= --SaveMixParam= --SavePerLevel= --SaveScaleFactor= --SetOovRate= --Statistics= --SubLMInfo= --TestOn= --TrainOn= --ad= --al= --ao= --ar= --beta= --bo= --cp= -d= --dub= -i= --lm= --lmp= --mcl= --memmap= --mm= -n= -o= --oARPA= --oASR= --oBIN= --oarpa= --oasr= --obin= --op= --or= -p= --pft= --ps= --pts= -s= --slmi= --smp= --spl= --ssf= --sz= --te= --tr= --DEBUG_LEVEL= " -- $cur) )
54 ;;
55 "dict")
56 COMPREPLY=( $(compgen -o filenames -W "--Curve= --CurveSize= --Freq= --InputFile= --IntSymb= --ListOOV= --LoadFactor= --OutputFile= --PruneFreq= --PruneRank= --Size= --TestFile= -c= --cs= -f= -i= --is= --lf= -o= --oov= --pf= --pr= -s= --sort= -t= --DEBUG_LEVEL= " -- $cur) )
57 ;;
58 "plsa")
59 COMPREPLY=( $(compgen -o filenames -W "--Dictionary= --ForceModel= --Iterations= --MemoryMap= --Model= --PruneFreq= --SpecialTopic= --Test= --Threads= --TmpDir= --TopWordsFile= --TopWordsNum= --TopicFeatures= --Topics= --Train= --WordFeatures= -d= --fm= --it= -m= --mm= --pf= --st= -t= --te= --tf= --th= --tmp= --tr= --twf= --twn= --wf= --EXAMPLES= --(1) --Train --Example 3 --<d> --<d> --<d> --(2) --Infer --(3) --Infer --DEBUG_LEVEL= " -- $cur) )
60 ;;
61 "score-lm")
62 COMPREPLY=( $(compgen -o filenames -W "-lm -dub -level -mm --DictionaryUpperBound= --dub= --lev= --level= --lm= --memmap= --mm= --DEBUG_LEVEL= " -- $cur) )
63 ;;
64 "dtsel")
65 COMPREPLY=( $(compgen -o filenames -W "--block-size= --bs= -c= --convergence-threshold= --cross-validation= --cv= --dictionary-upper-bound= --dub= -f= -i= --in-domain-file= --index= -m= --min-word-freq= --model= -n= --ngram-order= -o= --out-domain-file= -s= --score-file= -t= --test= -v= --verbose= -x= --DEBUG_LEVEL= " -- $cur) )
66 ;;
67 "build-sublm")
68 COMPREPLY=( $(compgen -o filenames -W "--size --ngrams --sublm --freq-shift --witten-bell --shift-beta --improved-shift-beta --good-turing --stupid-backoff --prune-singletons -pft, --cross-sentence --verbose " -- $cur) )
69 ;;
70 "quantize-lm")
71 COMPREPLY=( $(compgen -o filenames -W " --DEBUG_LEVEL= " -- $cur) )
72 ;;
73 "verify-caching")
74 COMPREPLY=( $(compgen -o filenames -W " --DEBUG_LEVEL= " -- $cur) )
75 ;;
76 "build-lm-qsub")
77 COMPREPLY=( $(compgen -o filenames -W "-i -o -k -n -t -p -u -q -s -b -d -v " -- $cur) )
78 ;;
79 "ngt")
80 COMPREPLY=( $(compgen -o filenames -W "--AugmentFile= --ConvDict= --Dictionary= --DistCo= --FilterDict= --FilterTable= --FilterTableRate= --HistoMask= --InpLen= --InputFile= --InputGoogleFormat= --LmTable= --NgramSize= --OutputFile= --OutputGoogleFormat= --OutputRedisFormat= --SaveBinaryTable= --SaveEach= --SaveSingle= --SubDict= --aug= -b= --cd= -d= --dc= --fd= --ft= --ftlm= --ftr= --gooinp= --gooout= --hm= -i= --iknstat= --il= --lm= --memuse= -n= -o= --redisout= --saveeach= --sd= --ss= --tlm= --DEBUG_LEVEL= " -- $cur) )
81 ;;
82 "prune-lm")
83 COMPREPLY=( $(compgen -o filenames -W "--abs= -t= --threshold= --DEBUG_LEVEL= " -- $cur) )
84 ;;
85 "split-dict")
86 COMPREPLY=( $(compgen -o filenames -W "--input --output --parts " -- $cur) )
87 ;;
88 "add-start-end")
89 COMPREPLY=( $(compgen -o filenames -W "-r -t -s " -- $cur) )
90 ;;
91 "compile-lm")
92 COMPREPLY=( $(compgen -o filenames -W "-d= --debug= --dict_load_factor= --dub= -e= --eval= -f= --filter= -i= --invert= --keepunigrams= --ku= -l= --level= --memmap= --mm= --ngram_load_factor= --ngramscore= --ns= -r= --randcalls= -s= --score= --sentence= -t= --text= --tmpdir= --DEBUG_LEVEL= " -- $cur) )
93 ;;
94
95 *)
96 ;;
97 esac
98 fi
99
100 return 0
101 }
102
103 complete -o bashdefault -o default -o nospace -F _irstlm irstlm
104
105
106 # vim:ft=sh: