The embodiments of the present invention relate to the field of
natural language processing technology and provide a text error
correction method, device, electronic device, and storage medium. The method comprises: obtaining a
target text to be corrected and performing semantic boundary recognition to obtain all semantic boundaries; then dividing the
target text into multiple clauses, assigning IDs according to the order in which each clause appears, and generating structured data with sequence IDs; inputting the structured data into a
language model, and calling the target
domain knowledge base corresponding to the
target text as a constraint condition to perform semantic
parsing and identify the error type; adjusting the error correction path based on the error type and then re-identifying the error information, wherein the error information includes error content, error type, and
error location; and reorganizing multiple clauses based on the
sequence ID and error content, error type, and
error location to generate an error correction result including the
error location, error type, and correction suggestions. Thus, the coordinated detection and correction of grammatical, semantic, and logical errors is achieved.