Soul model for language translation with neuronal network

how to implement the SOUL (stucture output layer) model, using word clustering for machine translation at the output layer of a neural network.
As explain according to this short article http://www.quaero.org/media/files/bibliographie/le_structured_output_icassp2011.pdf .
Please can someone help me with a source code for Pytorch framework, or a link that shows how to implement it, it will be very nice.