lsword =""
            for se in sentencebgs:
                for word in se:
                    #for tp in word:
                        #s = unicodedata.normalize('NFKD', tp).encode('ascii','ignore')
                        #lsword = lsword +" "+s
                    #print lsword
                    Sentset.add(word)
                    #lsword = ""

sparseVector = SparseVector
#print sentencebgs

Sorted_Senttest = sorted(Sentset)
numConver = NumConver(Sorted_Senttest)
print counts2

#print sentencebgs
#print numeric_sentencebgs
temp2= {}
counts2_numeric = []
for co in counts2:
    for c in co:
        #temp.append((numConver.getNumericFromString((c)),co[c]))
        temp2[numConver.getNumericFromString(c)] = co[c]
        #print co[c]
    counts2_numeric.append(temp2)
    temp2 = {}

 #   print "-----------------------------------------------------------"
            lsword =""
            for se in sentencetgs:
                for word in se:
                    #for tp in word:
                        #s = unicodedata.normalize('NFKD', tp).encode('ascii','ignore')
                        #lsword = lsword +" "+s
                    #print lsword
                    Sentset.add(word)
                    #lsword = ""

sparseVector = SparseVector
#print sentencebgs

Sorted_Senttest = sorted(Sentset)
numConver = NumConver(Sorted_Senttest)
print counts2

#print sentencebgs
#print numeric_sentencebgs
temp2= {}
counts2_numeric = []
'''
for co in counts2:
    for c in co:
        #temp.append((numConver.getNumericFromString((c)),co[c]))
        temp2[numConver.getNumericFromString(c)] = co[c]
        #print co[c]
    counts2_numeric.append(temp2)
    temp2 = {}
'''
Exemplo n.º 3
0
        lsword = ""
        for se in sentencetgs:
            for word in se:
                #for tp in word:
                #s = unicodedata.normalize('NFKD', tp).encode('ascii','ignore')
                #lsword = lsword +" "+s
                #print lsword
                Sentset.add(word)
                #lsword = ""

sparseVector = SparseVector
#print sentencebgs

Sorted_Senttest = sorted(Sentset)
numConver = NumConver(Sorted_Senttest)
print counts2

#print sentencebgs
#print numeric_sentencebgs
temp2 = {}
counts2_numeric = []
'''
for co in counts2:
    for c in co:
        #temp.append((numConver.getNumericFromString((c)),co[c]))
        temp2[numConver.getNumericFromString(c)] = co[c]
        #print co[c]
    counts2_numeric.append(temp2)
    temp2 = {}
'''
Exemplo n.º 4
0
        lsword = ""
        for se in sentencebgs:
            for word in se:
                #for tp in word:
                #s = unicodedata.normalize('NFKD', tp).encode('ascii','ignore')
                #lsword = lsword +" "+s
                #print lsword
                Sentset.add(word)
                #lsword = ""

sparseVector = SparseVector
#print sentencebgs

Sorted_Senttest = sorted(Sentset)
numConver = NumConver(Sorted_Senttest)
print counts2

#print sentencebgs
#print numeric_sentencebgs
temp2 = {}
counts2_numeric = []
for co in counts2:
    for c in co:
        #temp.append((numConver.getNumericFromString((c)),co[c]))
        temp2[numConver.getNumericFromString(c)] = co[c]
        #print co[c]
    counts2_numeric.append(temp2)
    temp2 = {}

#   print "-----------------------------------------------------------"