コード例 #1
0
ファイル: vows.py プロジェクト: saschwarz/tagging
def treeWithSomeOverlap():
    tree = DocumentTree()
    now = datetime(2012, 1, 31)
    doc0 = Document(title="Doc 0", date=now, excerpt="Document zero.", tags=('ATAG',), url='0.html')
    doc1 = Document(title="Doc 1", date=now, excerpt="Document one.", tags=('atag',), url='1.html')
    doc2 = Document(title="Doc 2", date=now, excerpt="Document two.", tags=('btag', 'ztag'), url='2.html')
    doc3 = Document(title="Doc 3", date=now, excerpt="Document three.", tags=('atag', 'ztag', 'dtag'), url='3.html')
    doc4 = Document(title="Doc 4", date=now, excerpt="Document four.", tags=('atag', 'ytag', 'ctag', 'xtag'), url='4.html')
    doc5 = Document(title="Doc 5", date=now, excerpt="Document five.", tags=('atag', 'btag', 'ctag', 'xtag', 'ytag'), url='5.html')
    doc6 = Document(title="Doc 6", date=now, excerpt="Document six.", tags=('xtag', 'ytag', 'ztag', 'dtag', 'etag', 'ftag'), url='6.hmtl')
    tree.add(doc0)
    tree.add(doc1)
    tree.add(doc2)
    tree.add(doc3)
    tree.add(doc4)
    tree.add(doc5)
    tree.add(doc6)
    return tree
コード例 #2
0
ファイル: vows.py プロジェクト: saschwarz/tagging
 def topic(self):
     tree = DocumentTree()
     now = datetime(2012, 1, 31)
     doc1 = Document(title="Doc 1", date=now, excerpt="Document one.", tags=('atag',))
     doc2 = Document(title="Doc 2", date=now, excerpt="Document two.", tags=('atag', 'btag'))
     doc3 = Document(title="Doc 3", date=now, excerpt="Document three.", tags=('atag', 'btag', 'ctag'))
     doc4 = Document(title="Doc 4", date=now, excerpt="Document four.", tags=('atag', 'btag', 'ctag', 'dtag'))
     doc5 = Document(title="Doc 5", date=now, excerpt="Document five.", tags=('atag', 'btag', 'ctag', 'dtag', 'etag'))
     doc6 = Document(title="Doc 6", date=now, excerpt="Document six.", tags=('atag', 'btag', 'ctag', 'dtag', 'etag', 'ftag'))
     tree.add(doc1)
     tree.add(doc2)
     tree.add(doc3)
     tree.add(doc4)
     tree.add(doc5)
     tree.add(doc6)
     return tree, doc1, doc2, doc3, doc4, doc5, doc6
コード例 #3
0
ファイル: vows.py プロジェクト: saschwarz/tagging
 def topic(self):
     tree = DocumentTree()
     doc = Document()
     tree.add(doc)
     return tree, doc