fukuball / jieba-php

"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module.
http://jieba-php.fukuball.com
MIT License
1.32k stars 260 forks source link

增加allowPOS支持,即tf-idf结果仅包括指定词性的词 #36

Closed citywill closed 6 years ago

citywill commented 6 years ago

例如: $vector = JiebaAnalyse::extractTags($content, 50, ['allowPOS' => ['n']]);

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.5%) to 57.911% when pulling baf446335ce245b948c4703eb548b9b6db447117 on citywill:master into a5980dc88ae98a261a0bdb1130be14d0136b373f on fukuball:master.

codecov-io commented 6 years ago

Codecov Report

Merging #36 into master will decrease coverage by 0.26%. The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   58.31%   58.04%   -0.27%     
==========================================
  Files           5        5              
  Lines        1353     1361       +8     
==========================================
+ Hits          789      790       +1     
- Misses        564      571       +7
Impacted Files Coverage Δ
src/class/JiebaAnalyse.php 73.33% <22.22%> (-7.27%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a5980dc...baf4463. Read the comment docs.

fukuball commented 6 years ago

Cool, 感謝~