def mask(self, symbol, on_value, off_value):
    """
    """
    mask_values = [on_value if lhs == symbol else off_value
                   for lhs, _ in self.production_rules]
    mask_values = tf.reshape(mask_values, [1, len(self.production_rules)])
    return mask_values