public static List<String> getTopSentenceList(String document, int size, String sentence_separator)
    {
        List<String> sentenceList = splitSentence(document, sentence_separator);
        List<List<String>> docs = convertSentenceListToDocument(sentenceList);
        TextRankSentence textRank = new TextRankSentence(docs);
        int[] topSentence = textRank.getTopSentence(size);
        List<String> resultList = new LinkedList<String>();
        for (int i : topSentence)
        {
            resultList.add(sentenceList.get(i));
        }
        return resultList;
    }
public static List < String > getTopSentenceList ( String document , int size , String sentence_separator ) { List < String > sentenceList = splitSentence ( document , sentence_separator ) ; List < List < String > > docs = convertSentenceListToDocument ( sentenceList ) ; TextRankSentence textRank = new TextRankSentence ( docs ) ; int [ ] topSentence = textRank . getTopSentence ( size ) ; List < String > resultList = new LinkedList < String > ( ) ; for ( int i : topSentence ) { resultList . add ( sentenceList . get ( i ) ) ; } return resultList ; }
一句话调用接口

@param document 目标文档
@param size     需要的关键句的个数
@param sentence_separator 句子分隔符，正则格式， 如：[。？?！!；;]
@return 关键句列表