forked from ParallelMeaningBank/elephant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduce.ini
More file actions
44 lines (39 loc) · 1.35 KB
/
produce.ini
File metadata and controls
44 lines (39 loc) · 1.35 KB
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
# This file contains recipes for automatically training and evaluating
# Elephant models. It is meant to be used with Produce, see
# https://github.com/texttheater/produce
# Error analysis
[out/%{lang}.%{portion}.%{model}.iobdiff]
dep.iobdiff_pretty = ./src/scripts/iobdiff_pretty
dep.gold = data/%{lang}.%{portion}.iob
dep.iob = out/%{lang}.%{portion}.%{model}.iob
recipe =
set -e
set -o pipefail
(diff -U 7 %{gold} %{iob} || true) | %{iobdiff_pretty} > %{target}
[out/%{lang}.%{portion}.%{model}.eval]
dep.gold = data/%{lang}.%{portion}.iob
dep.iob = out/%{lang}.%{portion}.%{model}.iob
dep.eval = ./src/scripts/eval
recipe =
set -e
set -o pipefail
paste -d' ' %{gold} %{iob} | cut -d' ' -f 1,2,4 | %{eval} > %{target}
[out/%{lang}.%{portion}.%{model}.iob]
dep.elephant = ./elephant
dep.model = out/%{lang}.train.%{model}.model
dep.input = data/%{lang}.%{portion}.iob
recipe =
set -e
set -o pipefail
cat %{input} | %{elephant} -m %{model} -f iob -F iob | sed -e 's/\t/ /' > %{target}
[out/%{lang}.train.%{model}.model]
dep.elman = models/english/elman
elman_option = %{' -e ' + elman if '-top10' in model else ''}
dep.pattern_file = patterns/%{model}.wappat
dep.input = data/%{lang}.train.iob
dep.devel = data/%{lang}.dev.iob
dep.train = ./elephant-train
recipe =
set -e
set -o pipefail
%{train}%{elman_option} -m %{target} -w %{pattern_file} -i %{input} -d %{devel}