Class HanLPProvider

java.lang.Object
org.miaixz.bus.extra.nlp.provider.hanlp.HanLPProvider
All Implemented Interfaces:
org.miaixz.bus.core.Provider, NLPProvider

public class HanLPProvider extends Object implements NLPProvider
HanLP分词引擎实现 项目地址:https://github.com/hankcs/HanLP Segment.seg(String)方法线程安全
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • HanLPProvider

      public HanLPProvider()
      构造
    • HanLPProvider

      public HanLPProvider(com.hankcs.hanlp.seg.Segment seg)
      构造
      Parameters:
      seg - Segment
  • Method Details

    • parse

      public NLPResult parse(CharSequence text)
      Description copied from interface: NLPProvider
      文本分词处理接口,通过实现此接口完成分词,产生分词结果
      Specified by:
      parse in interface NLPProvider
      Parameters:
      text - 需要分词的文本
      Returns:
      NLPResult分词结果实现