예제 #1
0
def unigram_smoothing(data, model):
    td, idf, vocab = data
    td = td[:, :-1]
    lsa = LSA(model)
    res = lsa.unigram_smoothing()
    print res.shape
    print np.abs(td - res).sum() / float(res.shape[0] * res.shape[1])
예제 #2
0
def unigram_smoothing(data, model):
    td, idf, vocab = data
    td = td[:,:-1]
    lsa = LSA(model)
    res = lsa.unigram_smoothing()
    print res.shape
    print np.abs(td-res).sum() / float(res.shape[0] * res.shape[1])