fukuball / jieba-php

"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module.

Home Page:http://jieba-php.fukuball.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

结果中出现了形如 \n2 这样的换行加数字的结果,如何不匹配换行开始的结果呢?

591776998 opened this issue · comments

原字符串是 团队管理 1、团队成员赋能\n2、团队成员工作协助、流程管控\n3、团队稳定性
匹配后的结果是 团队,管理,成员,赋能,\n2,工作,协助,流程,管控,\n3,稳定性
其中 \n是换行符,希望能不匹配到换行符应该怎么做呢?user_dict.txt里面添加 \n 1000000 w 没有效果

請問這種換行符號是在什麼系統出現的呢?

你直接str_replace替换为空格不就行了。。。