Home

Download

Tutorial

Manpage

FAQ


Prospector

Links

eman logo eman

...a feature-packed experiment manager.

Frequently Asked Questions

I want to create a corpus from the first N sentences but 'head' makes the corpus step fail.

Eman and SMT seeds are very careful, so if one command in the pipe fails, the whole step fails as well. head closes its STDIN when it's finished reading, causing a SIGPIPE for the previous command, which will then return a non-zero exit code. Possible workarounds:

# SIGPIPE will not propagate from bash (K. Bilek)
TAKE_FROM_COMMAND="bash -c 'zcat file.gz | head -n10000'" ... eman init corpus

# run in a subshell, fail OR succeed => success (M. Popel)
TAKE_FROM_COMMAND="( zcat file.gz | head -n10000 || : )" ... eman init corpus