import tensorflow as tf

            mapping_strings, name=name
        )

        word_strings = reverse_vocab_tags.lookup(tf.to_int64(word_ids))

        return word_strings

    def loss_layer(self, preds, ground_true, nwords, crf_params):
        with tf.name_scope("CRF_log_likelihood"):
            log_likelihood, _ = tf.contrib.crf.crf_log_likelihood(
                preds, ground_true, nwords, crf_params
            )

        loss = tf.reduce_mean(-log_likelihood)

        # regularizer = tf.contrib.layers.l2_regularizer(0.001)
        # reg = regularizer(embedding_variable)
        # loss += reg

        return loss

    def crf_decode_layer(self, logits, crf_params, nwords):
        with tf.name_scope("CRF_decode"):
            pred_ids, _ = tf.contrib.crf.crf_decode(logits, crf_params, nwords)

        return pred_ids
