1. A semiconductor device that searches keyword in an input data string, the semiconductor device comprising: a data shift section that receives the input data string, and generates a first substring and a second substring of the input data string, a beginning of the first string being shifted a first number of characters from a beginning of the input data string, a beginning of the second substring being shifted a second number of characters from the beginning of the first substring; a first content-addressable memory that stores a partial keyword of the keyword, the partial keyword being stored as a first partial keyword entry and a second partial keyword entry, wherein the first partial keyword entry including a predetermined number of characters, the predetermined number of characters of the first partial keyword entry comprising a first number of offset characters and a first number of keyword characters, and wherein the second keyword entry including the predetermined number of characters, the predetermined number of characters in the second keyword entry comprising a second number of offset characters and a second number of key word characters, the first number of offset characters being different from the second number of offset characters; a second content-addressable memory that stores the entirety of the keyword; and a control circuit that is coupled to the data shift section, to the first content-addressable memory, and to the second content-addressable memory, the control circuit configured to: compare the first sub string of the data shift section to the first partial keyword entry and the second partial keyword entry of the first content-addressable memory; when a part of the keyword represented by the first number of keyword characters is determined to be included in the first substring based on the comparison, extract 1) the first number of characters shifted that is associated with the first substring from the data shift section and 2) position information associated with the first partial keyword entry from the first content-addressable memory, the position information including a first offset value associated with the first number of offset characters; generate search data based on the first number of characters shifted and the position information; and when the search data is determined to match the keyword in the second content-addressable memory, allow the second content-addressable memory to output an address associated with the entirety of the keyword.