コード例 #1
0
ファイル: engine.py プロジェクト: Zojax/zojax.tagging
    def getItemsTagCloud(self, items):
        oid_tags = self.oid_tags

        tags = [oid_tags[oid] for oid in items if oid in oid_tags]
        if tags:
            tags = multiunion(tags)
        else:
            return

        total = len(oid_tags)
        data = self.weights.keys()
        weights = self.tag_weight

        percent = total / 100.0

        for tag in tags:
            yield weights[tag] / percent, self.tagsmap.get(tag)
コード例 #2
0
 def multiunion(self, *args):
     from BTrees.LLBTree import multiunion
     return multiunion(*args)
コード例 #3
0
ファイル: test_LLBTree.py プロジェクト: B-Rich/BTrees
 def multiunion(self, *args):
     from BTrees.LLBTree import multiunion
     return multiunion(*args)