Beispiel #1
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     doc1 = Document()
     doc1.id = '01' * 8
     doc1.tags['groundtruth'] = True
     doc2 = Document()
     doc2.id = '02' * 8
     doc2.tags['groundtruth'] = True
     doc4 = Document()
     doc4.id = '04' * 8
     doc4.tags['groundtruth'] = True
     self.db = {
         int(doc1.id): doc1.SerializeToString(),
         int(doc2.id): doc2.SerializeToString(),
         int(doc4.id): doc4.SerializeToString()
     }