In S231, the multicore CPU 101 receives the text string data 111 and a positive integer parameter r and generates the text string dictionary 112 (described in detail with reference to
In S232, the multicore CPU 101 receives a query string 121.
In S233, the multicore CPU 101 uses a known high-speed search method (Nonpatent Literature 1) utilizing the text string dictionary 112 to check the number of appearances of the query string 121 in the text string data 111.
In S234, the multicore CPU 101 outputs or displays the number of appearances checked in S233 as search results 122.
Hereinafter, a data structure to be used in a process (S231) of generating the text string dictionary 112 is defined.
“Blocks” are obtained by dividing the text string dictionary 112 being generated and are configured as lists including alphabetical characters or delimiters as constituent elements (entries). An “empty block” is an empty list. The blocks are placed in a shared memory.