Patent ID: 9465860
Filing Date: 2016-10-11
CPC Classification: G06F

Claim Text:
1. A non-transitory computer-readable storage medium that stores a program making a computer realize a character string registration function, the character string registration function comprising: storing in a storage device a trie tree in which nodes corresponding to predetermined characters are connected in accordance with a tree structure; reading out, characters of a new character string in sequence one-by-one from a head thereof to trace nodes included in the trie tree in accordance with characters corresponding to the nodes and determining a specific node that is located at a lowest side from nodes having an elder node among the traced nodes, the elder node and the specific node being located in a same layer and being connected to a same node that is directly located in a layer above the elder node and the specific node, the elder node being located at an upper side of the specific node; reading out the characters of the new character string from the specific node sequentially; determining whether a child node of the specific node exists by using a key of an initial character of the new character string when a priority of character string registered in the specific node is smaller than the priority of the new character string; adding a new node as a child node of the specific node to be corresponded with the read character when the child node does not exist; and registering the new character string and the priority to the child node of the specific node, wherein a previous character string, registered previously in a last node that registered a character string most recently, is registered into the child node traced by the previous character string from the last node when the new character string, that is different from the character string previously registered and the previous character string can trace a child node from the last node, has registered into one of traced nodes, and the previous character string in the last node is registered into the new node that is added below the last node when the new character string, that is different from the character string previously registered and the previous character string cannot trace any child node from the last node, has registered into one of traced nodes.