a3cf2e0e4113043
http://nhiro.org.s3.amazonaws.com/7/3/73d076f43847eb4ef258c37f073c6064.jpg https://gyazo.com/73d076f43847eb4ef258c37f073c6064
(OCR text)
対話的に学習データを追加
44
codecs.open ('SOMETHING.txt', 'r', 'utf-8')
unknown
buf
for line in unknown
preprocess (line)
make feature vector (s)
S
V
model.predict_proba (v) 0 1 SCore
buf.append ( (abs (0.5
line))
Score), sCore,
S r
buf.sort ()
dum, score, s, line in buf:
print u": . 2f}".format (score),
print line.strip()
for
rawinput ('y/n?>')
yn
if yn
'
y':
codecs.open ( 'XXX.txt', 'a', 'utf-8').write (line)
elif yn
'n'
codecs.open ('not XXX.txt', 'a', 'utf-8').write (line)
else:
print 'passed'