From b7f6512da24f510a312b2fb7a468f3480fedc52e Mon Sep 17 00:00:00 2001 From: seastar <2229029156@qq.com> Date: Wed, 14 Dec 2022 20:11:08 +0800 Subject: [PATCH] update Segment --- src/main/java/sy/util/Segment.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/main/java/sy/util/Segment.java b/src/main/java/sy/util/Segment.java index 4444d6f..717b8d7 100644 --- a/src/main/java/sy/util/Segment.java +++ b/src/main/java/sy/util/Segment.java @@ -1,9 +1,5 @@ package sy.util; -import com.github.houbb.segment.api.ISegmentResult; -import com.github.houbb.segment.bs.SegmentBs; -import com.github.houbb.segment.support.tagging.pos.tag.impl.SegmentPosTaggings; - import com.hankcs.hanlp.HanLP; import com.hankcs.hanlp.seg.common.Term; @@ -19,16 +15,6 @@ */ public class Segment { - public static List jiebaSegment(String text) { - List entryList = CollectionUtil.newArrayList(); - List resultList = SegmentBs.newInstance() - .posTagging(SegmentPosTaggings.simple()) - .segment(text); - resultList.forEach(result -> entryList.add(new Entry(result.word(), result.pos()))); - - return entryList; - } - public static List hanlpSegment(String text, boolean posi) { List entryList = CollectionUtil.newArrayList(); com.hankcs.hanlp.seg.Segment seg = HanLP.newSegment();