| Package | Description |
|---|---|
| com.hankcs.hanlp.collection.AhoCorasick |
| Modifier and Type | Method and Description |
|---|---|
State |
State.addState(Character character) |
State |
State.failure()
获取failure状态
|
State |
State.nextState(Character character)
按照character转移,根节点转移失败会返回自己(永远不会返回null)
|
State |
State.nextStateIgnoreRootState(Character character)
按照character转移,任何节点转移失败会返回null
|
| Modifier and Type | Method and Description |
|---|---|
Collection<State> |
State.getStates() |
Map<Character,State> |
State.getSuccess()
获取goto表
|
| Modifier and Type | Method and Description |
|---|---|
void |
State.setFailure(State failState,
int[] fail)
设置failure状态
|
Copyright © 2014–2021 码农场. All rights reserved.