Skip to content

Instantly share code, notes, and snippets.

@skannan-maf
skannan-maf / tagged_basket_iterator.py
Created November 17, 2021 11:37
Tagged basket iterator for Doc2vec
# Basket iterator class
class tagged_basket_iterator:
def __init__(self, tb):
self._df = tb._df
self._index = 0
def __next__(self):
total_len = len(self._df)
if self._index >= total_len:
#print("Raising after {}".format(total_len))