use of com.hankcs.hanlp.corpus.document.sentence.Sentence in project HanLP by hankcs.
the class CorpusLoader method convert2SentenceList.
public static List<List<IWord>> convert2SentenceList(String path) {
List<Document> documentList = CorpusLoader.convert2DocumentList(path);
List<List<IWord>> simpleList = new LinkedList<List<IWord>>();
for (Document document : documentList) {
for (Sentence sentence : document.sentenceList) {
simpleList.add(sentence.wordList);
}
}
return simpleList;
}
Aggregations