First version which trains and predicts correctly using a truncated charset