-
Notifications
You must be signed in to change notification settings - Fork 20
/
weka
executable file
·65 lines (63 loc) · 1.75 KB
/
weka
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# weka: run Weka from the command-line
#
# Weka can be obtained from http://www.cs.waikato.ac.nz/ml/weka/downloading.html
# Make sure that WEKAPATH is set to the full path that contains weka.jar in your .bashrc or .zshrc
# The snippets below enable tab completion in Bash and Zsh, respectively.
#
# Author: Jeroen Janssens (http://jeroenjanssens.com)
#
# See csv2arff and arff2csv for two examples
java -Xmx1024M -cp ${WEKAPATH}/weka.jar "weka.$@"
#########################################################
# Tab completion for Bash #
#########################################################
#
# export WEKAPATH="/home/joe/bin/"
#
# weka-classes () {
# unzip -l $WEKAPATH/weka.jar |
# sed -rne 's/.*(weka)\/([^g])([^$]*)\.class$/\2\3/p' |
# tr '/' '.'
# }
#
# weka-folders () {
# unzip -l $WEKAPATH/weka.jar |
# sed -rne 's/.*(weka)\/([^g])([^$]*)\/$/\2\3\./p' |
# tr '/' '.'
# }
#
# _completeweka() {
# local curw=${COMP_WORDS[COMP_CWORD]}
# local wordlist=$(weka-folders; weka-classes)
# COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw"))
# return 0
# }
#
# complete -o nospace -F _completeweka weka
#
#########################################################
# Tab completion for Zsh #
#########################################################
#
# export WEKAJAR="/home/joe/bin/weka.jar"
#
# weka-classes () {
# unzip -l $WEKAJAR |
# sed -rne 's/.*(weka)\/([^g])([^$]*)\.class$/\2\3/p' |
# tr '/' '.'
# }
#
# weka-folders () {
# unzip -l $WEKAJAR |
# sed -rne 's/.*(weka)\/([^g])([^$]*)\/$/\2\3\./p' |
# tr '/' '.'
# }
#
# function _completeweka {
# reply=($(weka-folders; weka-classes))
# }
#
# compctl -K _completeweka weka
#
#########################################################