接口 com.hankcs.hanlp.corpus.document.sentence.word.IWord
的使用

使用 IWord 的软件包
com.hankcs.hanlp.corpus.dictionary   
com.hankcs.hanlp.corpus.document   
com.hankcs.hanlp.corpus.document.sentence   
com.hankcs.hanlp.corpus.document.sentence.word   
com.hankcs.hanlp.corpus.util   
 

com.hankcs.hanlp.corpus.dictionaryIWord 的使用
 

参数类型为 IWordcom.hankcs.hanlp.corpus.dictionary 中的方法
 void DictionaryMaker.add(IWord word)
          向词典中加入一个词语
 void NGramDictionaryMaker.addPair(IWord first, IWord second)
           
 Item DictionaryMaker.get(IWord word)
           
 

类型变量类型为 IWordcom.hankcs.hanlp.corpus.dictionary 中的方法参数
protected  void NTDictionaryMaker.addToDictionary(List<List<IWord>> sentenceList)
           
protected  void NSDictionaryMaker.addToDictionary(List<List<IWord>> sentenceList)
           
protected  void NRDictionaryMaker.addToDictionary(List<List<IWord>> sentenceList)
           
protected  void NatureDictionaryMaker.addToDictionary(List<List<IWord>> sentenceList)
           
protected abstract  void CommonDictionaryMaker.addToDictionary(List<List<IWord>> sentenceList)
          加入到词典中,允许子类自定义过滤等等,这样比较灵活
 void CommonDictionaryMaker.compute(List<List<IWord>> sentenceList)
          处理语料,准备词典
protected  void NTDictionaryMaker.roleTag(List<List<IWord>> sentenceList)
           
protected  void NSDictionaryMaker.roleTag(List<List<IWord>> sentenceList)
           
protected  void NRDictionaryMaker.roleTag(List<List<IWord>> sentenceList)
           
protected  void NatureDictionaryMaker.roleTag(List<List<IWord>> sentenceList)
           
protected abstract  void CommonDictionaryMaker.roleTag(List<List<IWord>> sentenceList)
          角色标注,如果子类要进行label的调整或增加新的首尾等等,可以在此进行
 

com.hankcs.hanlp.corpus.documentIWord 的使用
 

返回变量类型为 IWord 的类型的 com.hankcs.hanlp.corpus.document 中的方法
static List<List<IWord>> CorpusLoader.convert2SentenceList(String path)
           
 List<List<IWord>> Document.getComplexSentenceList()
          获取复杂句子列表,句子中的每个单词有可能是复合词,有可能是简单词
 List<IWord> Document.getWordList()
          获取单词序列
static List<List<IWord>> CorpusLoader.loadSentenceList(String path)
           
 

类型变量类型为 IWordcom.hankcs.hanlp.corpus.document 中的方法参数
static boolean CorpusLoader.saveSentenceList(List<List<IWord>> sentenceList, String path)
           
 

com.hankcs.hanlp.corpus.document.sentenceIWord 的使用
 

类型参数类型为 IWordcom.hankcs.hanlp.corpus.document.sentence 中的字段
 List<IWord> Sentence.wordList
           
 

类型变量类型为 IWordcom.hankcs.hanlp.corpus.document.sentence 中的构造方法参数
Sentence(List<IWord> wordList)
           
 

com.hankcs.hanlp.corpus.document.sentence.wordIWord 的使用
 

实现 IWordcom.hankcs.hanlp.corpus.document.sentence.word 中的类
 class CompoundWord
          复合词,由两个或以上的word构成
 class Word
          一个单词
 

返回 IWordcom.hankcs.hanlp.corpus.document.sentence.word 中的方法
static IWord WordFactory.create(String param)
          根据参数字符串产生对应的词语
 

com.hankcs.hanlp.corpus.utilIWord 的使用
 

返回 IWordcom.hankcs.hanlp.corpus.util 中的方法
static IWord CorpusUtil.compile(IWord word)
          编译单词
 

返回变量类型为 IWord 的类型的 com.hankcs.hanlp.corpus.util 中的方法
static List<List<IWord>> CorpusUtil.convert2CompatibleList(List<List<Word>> simpleSentenceList)
          将word列表转为兼容的IWord列表
static List<IWord> CorpusUtil.spilt(List<IWord> wordList)
           
 

参数类型为 IWordcom.hankcs.hanlp.corpus.util 中的方法
static Word Precompiler.compile(IWord word)
           
static IWord CorpusUtil.compile(IWord word)
          编译单词
 

类型变量类型为 IWordcom.hankcs.hanlp.corpus.util 中的方法参数
static void Precompiler.compileWithoutNS(List<IWord> wordList)
          在忽略ns的前提下预编译
static void Precompiler.compileWithoutNT(List<IWord> wordList)
          在忽略ns的前提下预编译
static List<IWord> CorpusUtil.spilt(List<IWord> wordList)
           
 



Copyright © 2014–2015 码农场. All rights reserved.