com.hankcs.hanlp.corpus.document
类 CorpusLoader

java.lang.Object
  继承者 com.hankcs.hanlp.corpus.document.CorpusLoader

public class CorpusLoader
extends Object

作者:
hankcs

嵌套类摘要
static interface CorpusLoader.Handler
           
static class CorpusLoader.HandlerThread
          多线程任务
 
构造方法摘要
CorpusLoader()
           
 
方法摘要
static Document convert2Document(File file)
           
static List<Document> convert2DocumentList(String folderPath)
           
static List<List<IWord>> convert2SentenceList(String path)
           
static List<List<Word>> convert2SimpleSentenceList(String path)
           
static List<Document> loadCorpus(String path)
           
static List<List<IWord>> loadSentenceList(String path)
           
static boolean saveCorpus(List<Document> documentList, String path)
           
static boolean saveSentenceList(List<List<IWord>> sentenceList, String path)
           
static void walk(String folderPath, CorpusLoader.Handler handler)
           
static void walk(String folderPath, CorpusLoader.HandlerThread[] threadArray)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CorpusLoader

public CorpusLoader()
方法详细信息

walk

public static void walk(String folderPath,
                        CorpusLoader.Handler handler)

walk

public static void walk(String folderPath,
                        CorpusLoader.HandlerThread[] threadArray)

convert2DocumentList

public static List<Document> convert2DocumentList(String folderPath)

loadCorpus

public static List<Document> loadCorpus(String path)

saveCorpus

public static boolean saveCorpus(List<Document> documentList,
                                 String path)

loadSentenceList

public static List<List<IWord>> loadSentenceList(String path)

saveSentenceList

public static boolean saveSentenceList(List<List<IWord>> sentenceList,
                                       String path)

convert2SentenceList

public static List<List<IWord>> convert2SentenceList(String path)

convert2SimpleSentenceList

public static List<List<Word>> convert2SimpleSentenceList(String path)

convert2Document

public static Document convert2Document(File file)


Copyright © 2014–2015 鐮佸啘鍦�/a>. All rights reserved.