

def mapper(self, _, doc):
    c = {
        
    }
    for w in doc.split():
        if (w in c):
            c[w] += 1
        else:
            c[w] = 1
    for (w, c) in c.items():
        (yield (w, c))

dataset/ETHPy150Open LxMLS/lxmls-toolkit/lxmls/big_data/wordcount.py WordCount.mapper/original