graph based parser trainer script, other small changes