Text similarity, as an important basis for scoring subjective items in the examination, directly determines the examination results of candidates and the work efficiency of teachers. Therefore, this paper first introduces the theoretical basis of text similarity computing and compares different calculation methods. Then, the text-similarity algorithm is designed, where by conceptualizing text terms, the computing methods based on corpus and knowledge base are combined. Then, according to the similarity computing model of text terms, an automatic grading system for exercises is designed, including the design of technical architecture, the design of functional modules, and the realization process of comprehensive grading. Among them, the grading module is the core module of the system and the key to automatic grading. The systematic test results show that the problem scoring system designed in this paper has little difference from manual marking and can achieve good scoring results.