How to calculate BLUE score, precision, recall, calibration, confusion matrix for transformer?

how to calculate BLUE score, precision, recall, calibration, confusion matrix for transformer example presented in (Neural machine translation with a Transformer and Keras)( Modelo de transformador para compreensão da linguagem  |  Text  |  TensorFlow )