Wrongly written character generation method and terminal

文档序号:1127727 发布日期:2020-10-02 浏览:15次 中文

阅读说明:本技术 一种错别字的生成方法及终端 (Wrongly written character generation method and terminal ) 是由 刘德建 李上杰 方振华 陈宏� 郭玉湖 于 2020-05-06 设计创作,主要内容包括:本发明公开一种错别字的生成方法及终端,将正确字拆分成笔划,每一笔划有对应的路径数据;根据所述正确字的各个笔划以及错别字类型生成对应的错别字;根据所述错别字类型及所述正确字与所述错别字之间的差值对应的路径数据对所述错别字进行存储;一方面基于拆分后的笔划以及错别字类型能够快速方便直观地生成对应的错别字,另一方面能够方便确定出正确字与错别字之间的差异,并根据错别字类型及所述差异对错别字进行存储,不需要将整个错别字进行存储,降低了错别字的存储空间,提高空间利用率。(The invention discloses a method and a terminal for generating wrongly written characters, which are used for splitting correct characters into strokes, wherein each stroke has corresponding path data; generating corresponding wrongly written characters according to all strokes of the correct characters and the wrongly written character types; storing the wrongly-written characters according to the wrongly-written character types and path data corresponding to the difference values between the correct characters and the wrongly-written characters; on the one hand, the corresponding wrongly-written characters can be quickly, conveniently and intuitively generated based on the split strokes and the wrongly-written character types, on the other hand, the difference between the correct characters and the wrongly-written characters can be conveniently determined, the wrongly-written characters are stored according to the wrongly-written character types and the difference, the whole wrongly-written characters do not need to be stored, the storage space of the wrongly-written characters is reduced, and the space utilization rate is improved.)

1. A method for generating wrongly written characters is characterized by comprising the following steps:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

2. The method of claim 1, wherein the wrongly written word type comprises a reduced stroke;

the S3 includes:

determining reduced strokes according to the correct characters and the wrongly written characters, and determining corresponding path data indexes according to the reduced strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data indexes corresponding to the reduced strokes.

3. The method of claim 1, wherein the wrongly written word type comprises an increase stroke;

the S3 includes:

determining added strokes according to the correct characters and the wrongly written characters, and determining corresponding path data according to the added strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data corresponding to the added strokes.

4. The method of claim 1, wherein the wrongly written word type comprises a replacement stroke;

the S3 includes:

determining a replaced stroke according to the correct character and the wrongly-written character, and determining a path data index corresponding to the stroke before replacement and path data corresponding to the stroke after replacement according to the replaced stroke;

and storing the wrongly written characters according to the types of the wrongly written characters, the path data indexes corresponding to the strokes before replacement and the path data corresponding to the strokes after replacement.

5. The method for generating wrongly written words as claimed in any one of claims 1 to 4, wherein the step S1 is preceded by:

collecting words generated by means of the terminal platforms from the respective terminal platforms;

automatically identifying and comparing the collected characters through machine learning, and determining a preselected wrongly-written character list corresponding to each correct character in the collected characters;

determining a front preset wrongly-written character in a pre-selected wrongly-written character list corresponding to each correct character based on the stroke similarity and the stroke number difference, and taking the front preset wrongly-written character as a candidate wrongly-written character list corresponding to each correct character;

for each correct word and each of its corresponding candidate wrongly-written words, its corresponding wrongly-written word type is determined, and S2-S3 are performed in sequence.

6. A terminal for generating wrongly written words, comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor executes the computer program to perform the following steps:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

7. The terminal of claim 6, wherein the wrongly written character type comprises a reduced stroke;

the S3 includes:

determining reduced strokes according to the correct characters and the wrongly written characters, and determining corresponding path data indexes according to the reduced strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data indexes corresponding to the reduced strokes.

8. The terminal of claim 6, wherein the wrongly written character type comprises an increase stroke;

the S3 includes:

determining added strokes according to the correct characters and the wrongly written characters, and determining corresponding path data according to the added strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data corresponding to the added strokes.

9. The terminal of claim 6, wherein the wrongly written character type comprises a replacement stroke;

the S3 includes:

determining a replaced stroke according to the correct character and the wrongly-written character, and determining a path data index corresponding to the stroke before replacement and path data corresponding to the stroke after replacement according to the replaced stroke;

and storing the wrongly written characters according to the types of the wrongly written characters, the path data indexes corresponding to the strokes before replacement and the path data corresponding to the strokes after replacement.

10. The terminal for generating wrongly written words according to any one of claims 6 to 9, wherein the S1 is preceded by:

collecting words generated by means of the terminal platforms from the respective terminal platforms;

automatically identifying and comparing the collected characters through machine learning, and determining a preselected wrongly-written character list corresponding to each correct character in the collected characters;

determining a front preset wrongly-written character in a pre-selected wrongly-written character list corresponding to each correct character based on the stroke similarity and the stroke number difference, and taking the front preset wrongly-written character as a candidate wrongly-written character list corresponding to each correct character;

for each correct word and each of its corresponding candidate wrongly-written words, its corresponding wrongly-written word type is determined, and S2-S3 are performed in sequence.

Technical Field

The invention relates to the field of font processing, in particular to a method and a terminal for generating wrongly written characters.

Background

In reality, in addition to correct characters, wrongly written characters play a role. Wrongly written characters are used in many application scenarios, for example, in a wrongly written exercise problem, wrongly written characters that are easily confused with correct characters need to be listed so that a person doing the exercise can distinguish which character is the correct character or the wrongly written character; or the student has wrongly written characters in the process of learning and doing homework, the correct characters which are easy to be wrongly written and the corresponding wrongly written characters need to be stored to form a wrongly written character set so as to facilitate review in the future. In the prior art, the generated wrongly-written characters are usually stored directly, and when calling the correct characters and the wrongly-written characters corresponding to the correct characters is required, the correct characters and the wrongly-written characters are called from the stored correct character library and the wrongly-written character library respectively, which often causes waste of storage space and requires a relatively large space to be occupied for storing the correct characters and the wrongly-written characters corresponding to the correct characters.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: provided are a method and a terminal for generating wrongly written words, which can reduce the storage space of wrongly written words.

In order to solve the technical problems, the invention adopts a technical scheme that:

a method for generating wrongly written words comprises the following steps:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

In order to solve the technical problem, the invention adopts another technical scheme as follows:

a terminal for generating wrongly written words, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

The invention has the beneficial effects that: the method comprises the steps of splitting a correct character into strokes, wherein each stroke has corresponding path data, generating a corresponding wrongly-written character according to the stroke of the correct character and the type of the wrongly-written character, and storing the wrongly-written character according to the type of the wrongly-written character and the path data corresponding to a difference value between the correct character and the wrongly-written character.

Drawings

FIG. 1 is a flowchart illustrating steps of a method for generating wrongly written words according to an embodiment of the present invention;

fig. 2 is a schematic structural diagram of a terminal for generating wrongly written words according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a path data set corresponding to a "dragon" according to an embodiment of the present invention;

FIG. 4 is a diagram illustrating a path data set corresponding to "you" according to an embodiment of the present invention;

description of reference numerals:

1. a generation terminal for wrongly written characters; 2. a memory; 3. a processor.

Detailed Description

In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.

Referring to fig. 1, a method for generating wrongly written words includes the steps of:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

From the above description, the beneficial effects of the present invention are: the method comprises the steps of splitting a correct character into strokes, wherein each stroke has corresponding path data, generating a corresponding wrongly-written character according to the stroke of the correct character and the type of the wrongly-written character, and storing the wrongly-written character according to the type of the wrongly-written character and the path data corresponding to a difference value between the correct character and the wrongly-written character.

Further, the wrongly written word type includes a reduction of strokes;

the S3 includes:

determining reduced strokes according to the correct characters and the wrongly written characters, and determining corresponding path data indexes according to the reduced strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data indexes corresponding to the reduced strokes.

As can be seen from the above description, if the wrongly written characters are reduced in stroke, the storage only needs to store the corresponding wrongly written characters in stroke reduction and the reduced stroke corresponding path data index, and the corresponding wrongly written characters can be generated according to the stored content and the correct characters corresponding to the wrongly written characters.

Further, the wrongly written character type comprises an increase stroke;

the S3 includes:

determining added strokes according to the correct characters and the wrongly written characters, and determining corresponding path data according to the added strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data corresponding to the added strokes.

As can be seen from the above description, if the wrongly written characters are added strokes, the storage only needs to store the corresponding wrongly written characters as the added strokes and the path data corresponding to the added strokes, and the corresponding wrongly written characters can be generated according to the stored contents and the correct characters corresponding to the wrongly written characters.

Further, the wrongly written character type comprises a replacement stroke;

the S3 includes:

determining a replaced stroke according to the correct character and the wrongly-written character, and determining a path data index corresponding to the stroke before replacement and path data corresponding to the stroke after replacement according to the replaced stroke;

and storing the wrongly written characters according to the types of the wrongly written characters, the path data indexes corresponding to the strokes before replacement and the path data corresponding to the strokes after replacement.

As can be seen from the above description, if the type of the wrongly-written character is the replacement stroke, the storage only needs to store the type of the wrongly-written character as the replacement stroke, the path data index corresponding to the stroke before the replacement, and the path data corresponding to the replaced stroke.

Further, the S1 includes before:

collecting words generated by means of the terminal platforms from the respective terminal platforms;

automatically identifying and comparing the collected characters through machine learning, and determining a preselected wrongly-written character list corresponding to each correct character in the collected characters;

determining a front preset wrongly-written character in a pre-selected wrongly-written character list corresponding to each correct character based on the stroke similarity and the stroke number difference, and taking the front preset wrongly-written character as a candidate wrongly-written character list corresponding to each correct character;

for each correct word and each of its corresponding candidate wrongly-written words, its corresponding wrongly-written word type is determined, and S2-S3 are performed in sequence.

According to the description, the generated words are collected through each terminal platform, the candidate wrongly-written character list corresponding to each correct word is determined through machine learning, the candidate wrongly-written character list is determined based on the stroke similarity and the stroke number difference, the wrongly-written characters are generated based on the candidate wrongly-written character list, the wrongly-written characters with the largest possibility are screened out through big data analysis, and the usefulness of the generated wrongly-written characters is guaranteed.

Referring to fig. 2, a terminal for generating wrongly written words includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:

s1, splitting the correct character into strokes, wherein each stroke has corresponding path data;

s2, generating corresponding wrongly written characters according to strokes of the correct characters and wrongly written character types;

and S3, storing the wrongly-written words according to the wrongly-written word types and the path data corresponding to the difference value between the correct word and the wrongly-written words.

From the above description, the beneficial effects of the present invention are: the method comprises the steps of splitting a correct character into strokes, wherein each stroke has corresponding path data, generating a corresponding wrongly-written character according to the stroke of the correct character and the type of the wrongly-written character, and storing the wrongly-written character according to the type of the wrongly-written character and the path data corresponding to a difference value between the correct character and the wrongly-written character.

Further, the wrongly written word type includes a reduction of strokes;

the S3 includes:

determining reduced strokes according to the correct characters and the wrongly written characters, and determining corresponding path data indexes according to the reduced strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data indexes corresponding to the reduced strokes.

As can be seen from the above description, if the wrongly written characters are reduced in stroke, the storage only needs to store the corresponding wrongly written characters in stroke reduction and the reduced stroke corresponding path data index, and the corresponding wrongly written characters can be generated according to the stored content and the correct characters corresponding to the wrongly written characters.

Further, the wrongly written character type comprises an increase stroke;

the S3 includes:

determining added strokes according to the correct characters and the wrongly written characters, and determining corresponding path data according to the added strokes;

and storing the wrongly written characters according to the wrongly written character types and the path data corresponding to the added strokes.

As can be seen from the above description, if the wrongly written characters are added strokes, the storage only needs to store the corresponding wrongly written characters as the added strokes and the path data corresponding to the added strokes, and the corresponding wrongly written characters can be generated according to the stored contents and the correct characters corresponding to the wrongly written characters.

Further, the wrongly written character type comprises a replacement stroke;

the S3 includes:

determining a replaced stroke according to the correct character and the wrongly-written character, and determining a path data index corresponding to the stroke before replacement and path data corresponding to the stroke after replacement according to the replaced stroke;

and storing the wrongly written characters according to the types of the wrongly written characters, the path data indexes corresponding to the strokes before replacement and the path data corresponding to the strokes after replacement.

As can be seen from the above description, if the type of the wrongly-written character is the replacement stroke, the storage only needs to store the type of the wrongly-written character as the replacement stroke, the path data index corresponding to the stroke before the replacement, and the path data corresponding to the replaced stroke.

Further, the S1 includes before:

collecting words generated by means of the terminal platforms from the respective terminal platforms;

automatically identifying and comparing the collected characters through machine learning, and determining a preselected wrongly-written character list corresponding to each correct character in the collected characters;

determining a front preset wrongly-written character in a pre-selected wrongly-written character list corresponding to each correct character based on the stroke similarity and the stroke number difference, and taking the front preset wrongly-written character as a candidate wrongly-written character list corresponding to each correct character;

for each correct word and each of its corresponding candidate wrongly-written words, its corresponding wrongly-written word type is determined, and S2-S3 are performed in sequence.

According to the description, the generated words are collected through each terminal platform, the candidate wrongly-written character list corresponding to each correct word is determined through machine learning, the candidate wrongly-written character list is determined based on the stroke similarity and the stroke number difference, the wrongly-written characters are generated based on the candidate wrongly-written character list, the wrongly-written characters with the largest possibility are screened out through big data analysis, and the usefulness of the generated wrongly-written characters is guaranteed.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:题目内容提取方法、装置、可读存储介质及计算机设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!