mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
utf-8 output is more friendly to Linux
This commit is contained in:
parent
d3339633d5
commit
9bebe6120b
@ -15,7 +15,7 @@ tm_cost = t2-t1
|
||||
|
||||
log_f = open("1.log","wb")
|
||||
for w in words:
|
||||
print >> log_f, w.encode("gbk"), "/" ,
|
||||
print >> log_f, w.encode("utf-8"), "/" ,
|
||||
|
||||
print 'speed' , len(content)/tm_cost, " bytes/second"
|
||||
|
||||
|
@ -16,7 +16,7 @@ tm_cost = t2-t1
|
||||
|
||||
log_f = open("1.log","wb")
|
||||
for w in words:
|
||||
print >> log_f, w.encode("gbk"), "/" ,
|
||||
print >> log_f, w.encode("utf-8"), "/" ,
|
||||
|
||||
print 'speed' , len(content)/tm_cost, " bytes/second"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user