package com.ruoyi.biemo.nlp;

import com.hankcs.hanlp.HanLP;

import java.util.List;

public class SummaryUtils {

    //自动生成摘要
    public static String autoSummary(String text){
        String result = "";
        try{
            List<String> sentenceList = HanLP.extractSummary(text, 3);
            result = String.join(",",sentenceList.toArray(new String[]{}));
        }catch (Exception e){
            e.printStackTrace();
        }
        return result;
    }

}
