A non-transitory computer-readable recording medium having stored therein a prediction program that causes a computer to execute a process comprising:
- allocating an input first character string to a block that satisfies a predetermined condition;
- predicting, by using a feature amount of each character of a second character string in each block and a detector configured to detect keyword stuffing, a probability that keyword stuffing is present in the second character string;
- and
- predicting a center and a length of a keyword segment in the second character string when the probability is a predetermined threshold or more.