类 com.hankcs.hanlp.collection.AhoCorasick.State
的使用

使用 State 的软件包
com.hankcs.hanlp.collection.AhoCorasick   
 

com.hankcs.hanlp.collection.AhoCorasickState 的使用
 

返回 Statecom.hankcs.hanlp.collection.AhoCorasick 中的方法
 State State.addState(Character character)
           
 State State.failure()
          获取failure状态
 State State.nextState(Character character)
          按照character转移,根节点转移失败会返回自己(永远不会返回null)
 State State.nextStateIgnoreRootState(Character character)
          按照character转移,任何节点转移失败会返回null
 

返回变量类型为 State 的类型的 com.hankcs.hanlp.collection.AhoCorasick 中的方法
 Collection<State> State.getStates()
           
 Map<Character,State> State.getSuccess()
          获取goto表
 

参数类型为 Statecom.hankcs.hanlp.collection.AhoCorasick 中的方法
 void State.setFailure(State failState, int[] fail)
          设置failure状态
 



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