最好多多推荐一些对中国本土的一些互联网用词——比如说“卧槽,给力,牛逼,好六,六六六,水贴,爆吧,女票,男票,蓝孩子,孩纸”之类的俚语也能有很好的分词能力的中文分词API就好了。
<code class="language-python"><span class="o">>>></span><span class="n">seg_list</span> <span class="o">=</span> <span class="n">jieba</span><span class="o">.</span><span class="n">cut</span><span class="p">(</span><span class="s">"他来到了网易杭研大厦"</span><span class="p">)</span> <span class="o">>>></span><span class="k">print</span> <span class="s">", "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">seg_list</span><span class="p">)</span> <span class="err">他</span><span class="p">,</span> <span class="err">来到</span><span class="p">,</span> <span class="err">了</span><span class="p">,</span> <span class="err">网易</span><span class="p">,</span> <span class="err">杭研</span><span class="p">,</span> <span class="err">大厦</span> </code>