Welcome to mirror list, hosted at ThFree Co, Russian Federation.

setup.sh « factors « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7100359d5a7a5333b2c7d14b84f8e01cd1a0629 (plain)
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
#!/bin/bash -x 

##################################################################### 
# AUTHOR: pedrodiascoelho
#####################################################################

# Exit on error
set -e

# Test code goes here
test -f $MRT_MODELS/factors/model.npz || exit 1
test -f $MRT_MODELS/factors/model.npz.decoder.yml || exit 1
test -f $MRT_MODELS/factors/vocab.en.fsv || exit 1
test -f $MRT_MODELS/factors/vocab.de.fsv || exit 1

test -f $MRT_MODELS/factors/factors_concat/model.npz || exit 1 

test -f $MRT_DATA/europarl.de-en/corpus.bpe.de || exit 1
test -s vocab.de.yml || $MRT_MARIAN/marian-vocab < $MRT_DATA/europarl.de-en/corpus.bpe.de > vocab.de.yml

test -f $MRT_DATA/europarl.de-en/toy.bpe.en || exit 1
test -f $MRT_DATA/europarl.de-en/toy.bpe.de || exit 1

test -s toy.bpe.fact.en || cat $MRT_DATA/europarl.de-en/toy.bpe.en | \
	sed 's/\(\s\|$\)/|s0 /g;s/@@|s0/|s1/g;s/\s*$//' > toy.bpe.fact.en
test -s toy.bpe.fact.de || cat $MRT_DATA/europarl.de-en/toy.bpe.en | \
	        sed 's/\(\s\|$\)/|s0 /g;s/@@|s0/|s1/g;s/\s*$//' > toy.bpe.fact.de

# Exit with success code
exit 0