@staticmethod
def decode(itemset, table, mapping):
    """Yield sorted (item, variable, value) tuples (one for each item)"""
    attributes = table.domain.attributes
    for item in itemset:
        ivar, ival = mapping[item]
        var = attributes[ivar] if ivar < len(attributes
            ) else table.domain.class_var
        yield item, var, var.values[ival] if var.is_discrete else 0
