-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathscript.exp
168 lines (164 loc) · 7.62 KB
/
script.exp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/usr/bin/expect -f
#
# This Expect script was generated by autoexpect on Tue Mar 13 15:53:54 2018
# Expect and autoexpect were both written by Don Libes, NIST.
#
# Note that autoexpect does not guarantee a working script. It
# necessarily has to guess about certain things. Two reasons a script
# might fail are:
#
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
# etc.) and devices discard or ignore keystrokes that arrive "too
# quickly" after prompts. If you find your new script hanging up at
# one spot, try adding a short sleep just before the previous send.
# Setting "force_conservative" to 1 (see below) makes Expect do this
# automatically - pausing briefly before sending each character. This
# pacifies every program I know of. The -c flag makes the script do
# this in the first place. The -C flag allows you to define a
# character to toggle this mode off and on.
set force_conservative 0 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
#
# 2) differing output - Some programs produce different output each time
# they run. The "date" command is an obvious example. Another is
# ftp, if it produces throughput statistics at the end of a file
# transfer. If this causes a problem, delete these patterns or replace
# them with wildcards. An alternative is to use the -p flag (for
# "prompt") which makes Expect only look for the last line of output
# (i.e., the prompt). The -P flag allows you to define a character to
# toggle this mode off and on.
#
# Read the man page for more info.
#
# -Don
set timeout -1
spawn ./configure.py
match_max 100000
expect -exact "================================ Configure TEES ================================\r
Welcome to using the Turku Event Extraction System (TEES)! In order to work,\r
TEES depends on a number of other programs, which have to be set up before use.\r
\r
The classifier (1) is required for all uses of the system. The models (2) are\r
required for predicting events and together with the preprocessing tools (4) can\r
be used on any unprocessed text. The corpora (3) are used for testing the\r
performance of a model or for training a new model.\r
\r
If you are unsure which components you need, just install everything (the\r
default choice). You can also rerun configure.py at any time later to install\r
missing components.\r
\r
To make a choice, type the option's key and press enter, or just press enter for\r
the default option. The '*' sign indicates the default option and brackets a\r
selectable one.\r
--------------------------------------------------------------------------------\r
\[X\] 1) Install classifier (SVM Multiclass)\r
\[X\] 2) Install models (TEES models for BioNLP'09-13 and DDI'11-13)\r
\[X\] 3) Install corpora (BioNLP'09-13 and DDI'11-13)\r
\[X\] 4) Install preprocessing tools (BANNER, BLLIP parser etc)\r
* c) Continue and install selected items\r
q) Quit\r
================================================================================\r
>"
send -- "2\r"
expect -exact "================================ Configure TEES ================================\r
Welcome to using the Turku Event Extraction System (TEES)! In order to work,\r
TEES depends on a number of other programs, which have to be set up before use.\r
\r
The classifier (1) is required for all uses of the system. The models (2) are\r
required for predicting events and together with the preprocessing tools (4) can\r
be used on any unprocessed text. The corpora (3) are used for testing the\r
performance of a model or for training a new model.\r
\r
If you are unsure which components you need, just install everything (the\r
default choice). You can also rerun configure.py at any time later to install\r
missing components.\r
\r
To make a choice, type the option's key and press enter, or just press enter for\r
the default option. The '*' sign indicates the default option and brackets a\r
selectable one.\r
--------------------------------------------------------------------------------\r
\[X\] 1) Install classifier (SVM Multiclass)\r
\[ \] 2) Install models (TEES models for BioNLP'09-13 and DDI'11-13)\r
\[X\] 3) Install corpora (BioNLP'09-13 and DDI'11-13)\r
\[X\] 4) Install preprocessing tools (BANNER, BLLIP parser etc)\r
* c) Continue and install selected items\r
q) Quit\r
================================================================================\r
>"
send -- "3\r"
expect -exact "================================ Configure TEES ================================\r
Welcome to using the Turku Event Extraction System (TEES)! In order to work,\r
TEES depends on a number of other programs, which have to be set up before use.\r
\r
The classifier (1) is required for all uses of the system. The models (2) are\r
required for predicting events and together with the preprocessing tools (4) can\r
be used on any unprocessed text. The corpora (3) are used for testing the\r
performance of a model or for training a new model.\r
\r
If you are unsure which components you need, just install everything (the\r
default choice). You can also rerun configure.py at any time later to install\r
missing components.\r
\r
To make a choice, type the option's key and press enter, or just press enter for\r
the default option. The '*' sign indicates the default option and brackets a\r
selectable one.\r
--------------------------------------------------------------------------------\r
\[X\] 1) Install classifier (SVM Multiclass)\r
\[ \] 2) Install models (TEES models for BioNLP'09-13 and DDI'11-13)\r
\[ \] 3) Install corpora (BioNLP'09-13 and DDI'11-13)\r
\[X\] 4) Install preprocessing tools (BANNER, BLLIP parser etc)\r
* c) Continue and install selected items\r
q) Quit\r
================================================================================\r
>"
send -- "c\r"
expect -exact "================================================================================\r
>"
send -- "c\r"
expect -exact "================================== Classifier ==================================\r
TEES uses the SVM Multiclass classifer by Thorsten Joachims for all\r
classification tasks. You can optionally choose to compile it from source if the\r
precompiled Linux-binary does not work on your system.\r
--------------------------------------------------------------------------------\r
\[ \] 1) Compile from source\r
* i) Install\r
s) Skip\r
================================================================================\r
>"
send -- "i\r"
expect -exact "==================================== Tools ====================================\r
The tools are required for processing unannotated text and can be used as part\r
of TEES, or independently through their wrappers. For information and usage\r
conditions, see https://github.com/jbjorne/TEES/wiki/Licenses. Some of the tools\r
need to be compiled from source, this will take a while.\r
\r
The external tools used by TEES are:\r
\r
The GENIA Sentence Splitter of Tokyo University (Tsuruoka Y. et. al.)\r
\r
The BANNER named entity recognizer by Robert Leaman et. al.\r
\r
The BLLIP parser of Brown University (Charniak E., Johnson M. et. al.)\r
\r
The Stanford Parser of the Stanford Natural Language Processing Group\r
--------------------------------------------------------------------------------\r
\[ \] 1) Redownload already downloaded files\r
\r
\[X\] 2) Install GENIA Sentence Splitter\r
\[X\] 3) Install BANNER named entity recognizer\r
\[X\] 4) Install BLLIP parser\r
\[X\] 5) Install Stanford Parser\r
\r
* i) Install\r
s) Skip\r
================================================================================\r
>"
send -- "i\r"
expect eof