':key: åå§åå³äºwordçç»è®¡è®¡æ°ãåå³æ¡ä»¶: self.V, self.K, self.Z, self.arts_Z'

def init_statistics_word(self):

    assert ((self.V > 0) and (self.K > 0) and self.Z and self.arts_Z)
    self.nw = numpy.zeros((self.K, self.V), dtype=numpy.int)
    self.nwsum = numpy.zeros((self.K, 1), dtype=numpy.int)
    for m in range(self.M):
        for (k, w) in zip(self.Z[m], self.arts_Z[m]):
            self.nw[(k, w)] += 1
            self.nwsum[(k, 0)] += 1
    return
