Skip to main content
. 2024 Oct 18;10:e2344. doi: 10.7717/peerj-cs.2344
Algorithm 1: To build sequential lexicon
Input: Lexicon Trie T, the sequential character of Chinese sentence C=C1,C2,,Cn
Output: The k-th sequential lexicon LS=LS1,LS2,,LSk
1.Initialize an empty list LC.
2.For each character c in C, do: build the first word list append to LC.
3.Initialize an empty list LS.
4.For each character c in C, do: use depth search algorithm DFS(index, current_sequence) to build sequential lexicon LS.