#encoding=utf-8
import web
import sys
sys.path.append("./jieba-master/")
import jieba
import jieba.posseg
import jieba.analyse
urls = (
'/', 'index',
'/test', 'test',
)
app = web.application(urls, globals())
class index:
def GET(self):
params = web.input()
userid = params.get('userid', '')
return userid
class test:
def GET(self):
params = web.input()
content = params.get('content', '')
seg_list = jieba.cut(content, cut_all=False)
result = "\t".join(seg_list)
ret = content + ': \n' + result
return ret
if name == "__main__":
app.run()