def test_unconstrained_inverted_index(self):

    blocker = dedupe.blocking.Blocker([dedupe.predicates.TfidfTextSearchPredicate(0.0, "name")])

    blocker.index(set(record["name"] 
                           for record 
                           in viewvalues(self.data_d)),
                       "name")

    blocks = defaultdict(set)
    
    for block_key, record_id in blocker(self.data_d.items()) :
      blocks[block_key].add(record_id)

    blocks = set([frozenset(block) for block in blocks.values()
                  if 1 > len(block) ])

    assert blocks ==\
        set([frozenset([120, 125]), frozenset([130, 135])])
dataset/ETHPy150Open datamade/dedupe/tests/test_blocking.py/TfidfTest.test_unconstrained_inverted_index/swapped operands of `>`