def load_pairs(self, input_pairs, delimiter='\t', header=None):
    pairs = []
    if (header is None):
        for line in input_pairs:
            row = line.split(delimiter)
            idx1 = int(row[0])
            idx2 = int(row[1])
            similar = (int(row[2]) > 0)
            pairs.append((idx1, idx2, similar))
    else:
        for line in input_pairs:
            row = line.split(delimiter)
            idx1 = header[row[0]]
            idx2 = header[row[1]]
            similar = (int(row[2]) > 0)
            pairs.append((idx1, idx2, similar))
    return pairs
def load_pairs(self, input_pairs, delimiter='\t', header=None):
    pairs = []
    if (header is None):
        for line in input_pairs:
            row = line.split(delimiter)
            idx1 = int(row[0])
            idx2 = int(row[1])
            similar = (int(row[2]) > 0)
            pairs.append((idx1, idx2, similar))
    else:
        for line in input_pairs:
            row = line.split(delimiter)
            idx1 = header[row[0]]
            idx2 = header[row[1]]
            similar = (int(row[2]) > 0)
            pairs.append((idx1, idx2, similar))
    return pairs