training almost done for ILP-based joint decoder