Method, device, equipment and system for grammar analysis
By obtaining user grade information and combining the text to be analyzed, the dictionary pen can output grammatical analysis content suitable for different user groups, solving the problem of single grammatical analysis content in the prior art and improving the user experience.
Patent Information
- Application Number
- CN202311270768.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
The existing dictionary pen failed to consider the knowledge differences between different user groups during grammar analysis, resulting in the output grammar analysis content being single and reduces the user experience.
By obtaining the text to be analyzed and the grade information of the user, determining the grammatical analysis content corresponding to the user's grade information, and outputting the grammatical analysis results suitable for different user groups.
Improve user experience, ensure that the grammatical analysis content matches the user's cognitive level, and enhances learning efficiency.
Smart Images

Figure CN119721019A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a grammar parsing method, device, equipment and system. Background Art
[0002] In order to help users learn languages, various dictionary pens have been launched on the market. Users can use the dictionary pen to scan or click on the words or texts they want to know, and the dictionary pen will display the meaning of the corresponding words or texts on the screen of the dictionary pen to help users quickly understand the meaning of words or texts. Although the existing dictionary pens can output the grammatical analysis content of the text to be analyzed based on the acquired text to be analyzed, due to the different knowledge mastered by different user groups, the needs of different user groups for dictionary pens are also different. Therefore, the grammatical analysis content output by the current dictionary pen does not take into account the differences between different user groups, and the single output content reduces the user experience. Summary of the invention
[0003] The embodiments of the present application provide a grammatical parsing method, apparatus, device and system for solving the problem of presenting grammatical parsing content corresponding to the grammatical knowledge mastered by different user groups when grammarizing input text to improve user experience.
[0004] To achieve the above objectives, the present application provides the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a grammatical parsing method, the method comprising: a grammatical parsing device obtains a text to be analyzed and the grade information of a user. The grammatical parsing device determines the grammatical parsing content of the text to be analyzed based on the text to be analyzed and the grade information of the user, and the grammatical parsing content corresponds to the grade information of the user. The grammatical parsing device outputs the grammatical parsing content of the text to be analyzed corresponding to the grade information of the user.
[0006] An embodiment of the present application provides a grammatical parsing method. When a grammatical parsing device performs grammatical parsing on a text to be analyzed, it is necessary not only to obtain the text to be analyzed but also to combine the user's grade information. This makes it convenient for the grammatical parsing device to combine the user's grade information to determine the grammatical parsing content corresponding to the user's grade information when performing grammatical parsing on the text to be analyzed. This makes it convenient to present grammatical parsing content corresponding to the grammatical knowledge mastered by different user groups to different user groups when performing grammatical parsing on the input text.
[0007] In a possible implementation of the present application, a grammatical parsing device has a grammatical parsing library, in which the grammatical parsing content of the text to be analyzed is determined, and the grammatical parsing library at least stores the grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text; accordingly, the grammatical parsing device determines the grammatical parsing content of the text to be analyzed based on the text to be analyzed and the grade information of the user, and the sentence analysis content of the grammatical parsing content corresponds to the grade information of the user, including: the grammatical parsing device determines the grammatical parsing content of the text to be analyzed from the grammatical parsing library based on the text to be analyzed and the grade information of the user. This makes it easy for the grammatical parsing device to obtain the grammatical parsing content of the text to be analyzed from the local grammatical parsing library without being connected to the Internet.
[0008] In a possible implementation of the present application, a grammatical parsing device determines the grammatical parsing content of the text to be analyzed based on the text to be analyzed and the user's grade information, including: the grammatical parsing device determines the grammatical parsing content of the text to be analyzed from a server based on the text to be analyzed and the user's grade information. The server has a grammatical parsing library, and the grammatical parsing content of the text to be analyzed is determined in the grammatical parsing library, and the grammatical parsing library stores at least the grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text. This makes it easy for the grammatical parsing device to obtain the grammatical parsing content of the text to be analyzed through interaction with the server.
[0009] In a possible implementation of the present application, when the grammar parsing device is an electronic device, the electronic device may obtain an updated grammar parsing library from a server so as to be able to output more accurate grammar parsing content.
[0010] In a possible implementation of the present application, the grammar parsing device is a server, and the grammar parsing device obtains the text to be analyzed and the grade information of the user, including: the grammar parsing device obtains the text to be analyzed and the grade information of the user from a dictionary pen.
[0011] In a possible implementation of the present application, the grammatical parsing device is a server, and the method provided in the embodiment of the present application also includes: the grammatical parsing device determines the grammatical display attributes that need to be displayed for different grade information and the sentence analysis content to be displayed corresponding to each of the grammatical display attributes, and the grammatical display attributes are used to reflect the sentence analysis content required by users of different grades. The grammatical parsing device determines the grammatical parsing content corresponding to each text in one or more texts and the grade information corresponding to each of the texts. The grammatical parsing device marks the grade information and grammatical display attributes of each of the texts according to the grammatical parsing content corresponding to each text and the grade information corresponding to each of the texts, so that each of the texts corresponds to at least one grade information, and the grammatical display attributes and the grammatical parsing content corresponding to each grade information.
[0012] In a possible implementation of the present application, a grammatical parsing device determines the grammatical parsing content corresponding to each text in one or more texts, including: the grammatical parsing device obtains the grammatical parsing content corresponding to each target text in one or more target texts; the grammatical parsing device obtains multiple texts; the grammatical parsing device determines the target text corresponding to each text based on the confidence between the multiple texts and each target text; the grammatical parsing device obtains the target text corresponding to each text based on the texts, and determines the grammatical parsing content corresponding to each text, and the grammatical parsing content corresponding to any text is the same as the grammatical parsing content of the target text corresponding to any text.
[0013] In a second aspect, an embodiment of the present application provides a grammar parsing device, the grammar parsing device comprising:
[0014] The first acquisition unit is used to acquire the text to be analyzed and the grade information of the user. The determination unit is used to determine the grammatical analysis content of the text to be analyzed according to the text to be analyzed and the grade information of the user, and the grammatical analysis content corresponds to the grade information of the user. The output unit is used to output the grammatical analysis content of the text to be analyzed corresponding to the grade information of the user.
[0015] As an example, the grammar parsing device can be integrated into the grammar parsing device as a chip, or the grammar parsing device is the grammar parsing device, which is not limited in the embodiments of the present application.
[0016] In a possible implementation of the present application, the determination unit is specifically used to determine the grammatical parsing content of the text to be analyzed from the grammatical parsing library according to the text to be analyzed and the grade information of the user. The grammatical parsing library at least stores the grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each of the grammatical parsing content is consistent with the grade information corresponding to the text.
[0017] In a possible implementation of the present application, the first acquisition unit is specifically configured to acquire the text to be analyzed and the user's grade information from the dictionary pen.
[0018] In a possible implementation of the present application, the first acquisition unit is specifically configured to acquire the text to be analyzed by means of an image sensor of the dictionary pen.
[0019] In a possible implementation of the present application, the second acquisition unit is used to determine the grammatical display attributes that need to be displayed for different grade information and the sentence analysis content to be displayed corresponding to each of the grammatical display attributes, and the grammatical display attributes are used to reflect the sentence analysis content required by users of different grades. The determination unit is also used to determine the grammatical parsing content corresponding to each text in one or more texts and the grade information corresponding to each of the texts. The processing unit is also used to mark the grade information and grammatical display attributes of each of the texts according to the grammatical parsing content corresponding to each text and the grade information corresponding to each of the texts, so that each of the texts corresponds to at least one grade information, and the grammatical display attributes and the grammatical parsing content corresponding to each grade information.
[0020] In a possible implementation of the present application, the second acquisition unit is also used to obtain the grammatical parsing content corresponding to each of the target texts in one or more target texts; the second acquisition unit is also used to obtain multiple texts; the processing unit is used to determine the target text corresponding to each of the texts based on the confidence between the multiple texts and each of the target texts; the grammatical parsing device obtains the target text corresponding to each of the texts based on the texts, and determines the grammatical parsing content corresponding to each of the texts, and the grammatical parsing content corresponding to any of the texts is the same as the grammatical parsing content of the target text corresponding to any of the texts. A third aspect of an embodiment of the present application provides a grammatical parsing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the grammatical parsing method described in the first aspect of an embodiment of the present application or any possible implementation of the first aspect.
[0021] In the case where the grammatical parsing device in the third aspect is a server, the grammatical parsing device may also include a communication interface, which is used to support the server to interact with electronic devices such as dictionary pens to obtain the user's grade information and the text to be analyzed from electronic devices such as dictionary pens.
[0022] In the case where the grammatical parsing device in the third aspect is an electronic device such as a dictionary pen, optionally, the grammatical parsing device may also include an image sensor, which is used to support electronic devices such as dictionary pens to scan the area to be identified to obtain an image including the area to be identified, and provide it to a processor so that the processor can identify the text to be analyzed from the image.
[0023] The fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the grammatical parsing method described in the first aspect of the embodiment of the present application or any possible implementation method of the first aspect.
[0024] The fifth aspect of the embodiments of the present application provides a grammatical parsing system, which includes a server and an electronic device, wherein a grammatical parsing library is stored in the server, and the grammatical parsing library at least stores grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text, and the electronic device is used to execute the grammatical parsing method described in the first aspect of the embodiments of the present application or any possible implementation of the first aspect. Alternatively, the server is used to execute the grammatical parsing method described in the first aspect of the embodiments of the present application or any possible implementation of the first aspect, and the electronic device is used to provide the user's grade information and the text to be analyzed to the server.
[0025] The sixth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on a server, the server executes the grammatical parsing method described in the first aspect of the embodiments of the present application or any possible implementation of the first aspect.
[0026] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of a scenario applicable to a grammar parsing method provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of a grammar parsing device provided in an embodiment of the present application;
[0029] Figure 3 A flowchart of a syntax parsing method provided in an embodiment of the present application;
[0030] Figure 4 A flowchart of another syntax parsing method provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of the structure of a grammar parsing device provided in an embodiment of the present application;
[0032] Figure 6 A schematic diagram of the structure of another grammar parsing device provided in an embodiment of the present application;
[0033] Figure 7 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially identical functions and effects. For example, the first grammatical parsing result and the second grammatical parsing result are only used to distinguish between different grammatical parsing results, and their order of precedence is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0035] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0036] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0037] The grammatical analysis of the dictionary pens currently on the market basically uses sentence structure, tense and voice as the entry point, and the grammatical analysis content with the same grammatical structure is presented to students of all ages when searching. However, the grammatical knowledge mastered by students of different ages is often different. Therefore, if the grammatical analysis content with the same grammatical structure is presented to different user groups during grammatical analysis, the content may not be equal to the grammatical cognition level of the students' age groups. For example, if there is no systematic learning of grammatical knowledge (such as sentence structure: subject, predicate, attributive, etc.) in primary school, if it is presented according to the normal grammatical structure, the grammatical analysis content will be difficult for primary school students to understand.
[0038] Based on this, an embodiment of the present application provides a grammatical parsing method, which is used to realize that when an electronic device such as a dictionary pen obtains a text to be analyzed, it combines the user's grade information to present grammatical parsing content corresponding to the user's grade information.
[0039] A syntax parsing method provided in an embodiment of the present application can be applied to electronic devices or servers with syntax parsing functions such as mobile phones, tablet computers, scanning and recognition devices, and the embodiment of the present application does not impose any restrictions on the specific type of electronic devices.
[0040] like Figure 1 As shown, Figure 1 A schematic diagram of a scenario used in a grammar parsing method provided in an embodiment of the present application, such as Figure 1 As shown, the scene includes: a dictionary pen.
[0041] The above scenario takes the electronic device as a dictionary pen as an example. It is understandable that in actual practice, the electronic device can also be a dictionary pen, a mobile phone, a tablet or a computer and other devices with a grammar parsing function. For example, when the electronic device is a mobile phone, a tablet or a computer, a grammar parsing application (Application, APP) can be run in the electronic device, and the user can use the grammar parsing APP to obtain the text to be analyzed.
[0042] Taking the electronic device as a dictionary pen as an example, when the user needs to determine the semantic analysis result of the text to be analyzed, such as English text, the user can use the dictionary pen to click the initial letter of the word in the English text, and then obtain all the letters that make up the English text through the pen tip position camera of the English text. After the dictionary pen obtains the content of the English text, it can output the grammatical analysis result corresponding to the English text through its display screen.
[0043] As an example, the dictionary pen may also have a first control (such as a download control), and the user can trigger the download control to enable the dictionary pen to download relevant text courseware from the server. For example, if the dictionary pen detects the user's operation on the download control, it can download the grammatical analysis library corresponding to the user's grade information, or download the grammatical analysis library corresponding to all school age stages. The embodiments of the present application are not limited to this.
[0044] As an example, the dictionary pen may also have a power on / off control and / or a volume control, wherein the power on / off control is used to trigger the dictionary pen to turn on or off, and the volume control is used to adjust the volume output by the dictionary pen.
[0045] Optional, such as Figure 1 The scenario shown may also include a server, and there is a communication connection between the electronic device and the server. Electronic devices such as a dictionary pen can obtain grammatical analysis content of the text to be analyzed corresponding to the user's grade information from the server.
[0046] As an example, the server stores grammatical parsing contents of one or more texts, wherein each text may correspond to at least one grammatical parsing content, each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text.
[0047] Optionally, when there are multiple grammatical analysis contents in a text, the multiple grammatical analysis contents corresponding to the same text have different sentence analysis contents, and the multiple grammatical analysis contents corresponding to the same text correspond to different grade information. For example, text A is involved in textbooks for both primary school and junior high school, so it can be marked that text A corresponds to primary school and junior high school, and then the grammatical analysis contents corresponding to text A can be grammatical analysis content 1 and grammatical analysis content 2, wherein grammatical analysis content 1 includes content that is adapted to the sentence analysis contents that should be mastered in the textbooks for the primary school stage. For example, the primary school stage requires students to master the sentence grammatical structure that is consistent with the key sentence patterns in the class. For example, the primary school stage requires students to master the key sentence patterns in the class as I don't + verb original form (+ other). If text A is I don't know how to go there, the sentence analysis contents corresponding to grammatical analysis content 1 include: I don't + verb original form (+ other). Of course, optionally, the grammatical analysis content 1 can also include the whole sentence translation content of text A. Optionally, if sentences and sentence patterns are important knowledge points in primary school English. The sentence analysis content corresponding to the grammar analysis content 1 may also be the analysis content such as the detailed explanation of the sentence patterns, life examples, grammar expansion, sentences and sentence patterns of text A.
[0048] A sentence consists of a subject, predicate, object, attributive, adverbial and other components, and can be divided into different types, such as declarative sentences, interrogative sentences, imperative sentences, exclamatory sentences, etc. Sentence pattern refers to the structural relationship between the various components in a sentence, such as subject-predicate structure, subject-predicate-object structure, subject-copula-predicate structure, etc.
[0049] For example, grammar analysis content 2 includes content that is compatible with sentence analysis content that should be mastered in junior high school textbooks. For example, junior high school textbooks require students to master grammar, tense and other related knowledge, so grammar analysis content 2 may include tense analysis, sentence type, grammar and other analysis content of text A.
[0050] As an example, a server has a grammatical parsing library, which stores at least grammatical parsing contents of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text. Optional. Among them, multiple grammatical parsing contents corresponding to the same text have different sentence analysis contents, and multiple grammatical parsing contents corresponding to the same text correspond to different grade information.
[0051] Of course, as an example, the grammar parsing library can also be stored in the electronic device. In this case, the server in the above scenario can be omitted, so that even if the electronic device is not connected to the network, the grammar parsing content of the text to be analyzed corresponding to the user's grade information can be output. It is understandable that the server can send the content of the grammar parsing library to the electronic device so that the electronic device has the grammar parsing library.
[0052] As an example, the grammatical parsing library may include grammatical parsing libraries corresponding to different school ages / grades. For example, a grammatical parsing library corresponding to the junior high school stage, a grammatical parsing library corresponding to the senior high school stage, and a grammatical parsing library corresponding to the primary school stage. For example, the grammatical parsing library corresponding to the junior high school stage stores the grammatical parsing content corresponding to one or more texts in the junior high school stage. The grammatical parsing library corresponding to the senior high school stage stores the grammatical parsing content corresponding to one or more texts in the senior high school stage. The grammatical parsing library corresponding to the primary school stage stores the grammatical parsing content corresponding to one or more texts in the primary school stage.
[0053] In this way, when the server or the electronic device obtains the user's grade information and the text to be analyzed, it can obtain the grammatical analysis content of the text to be analyzed from the grammatical analysis corresponding to the user's grade information according to the user's grade information.
[0054] As an example, the server may provide the electronic device with a grammar parsing library that matches the user's grade information based on the user's grade information provided by the electronic device. For example, if the user's grade information reflects that the user is in primary school, the server may provide the electronic device with a grammar parsing library corresponding to the primary school stage, so that the electronic device downloads the grammar parsing library corresponding to the primary school stage from the server to the electronic device.
[0055] like Figure 2 As shown, Figure 2 A schematic diagram of a grammar parsing device provided in an embodiment of the present application, the grammar parsing device comprising: a processor 101, a communication line 102, at least one communication interface ( Figure 2 The communication interface 103 is used as an example for explanation).
[0056] The processor 101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0057] The communication link 102 may include a pathway to transmit information between the above-mentioned components.
[0058] The communication interface 103 is used to exchange information with other devices, for example, using any transceiver-like device to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
[0059] Optionally, the electronic device may further include a memory 104 .
[0060] The memory 104 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 104 may exist independently and be connected to the processor 101 through the communication line 102. The memory 104 may also be integrated with the processor 101.
[0061] The memory 104 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 101. The processor 101 is used to execute the computer-executable instructions stored in the memory 104, thereby implementing a syntax analysis method provided in the following embodiment of the present application.
[0062] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0063] In a specific implementation, as an embodiment, the processor 101 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in.
[0064] In a specific implementation, as an embodiment, the grammar parsing device may include multiple processors, such as Figure 2 1 and 105. Each of these processors may be a single-core (Single-CPU) processor or a multi-core (Multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0065] Optionally, when the grammar parsing device is a device with a grammar analysis function such as a dictionary pen, the grammar parsing device may further include a scanning device 106 .
[0066] The scanning device 106 is used by the grammar analysis device to obtain the text to be analyzed. For example, the scanning device 106 can scan the text in a preset area (such as a book) and extract the text in the preset area to obtain the text to be analyzed.
[0067] In a specific implementation, the scanning device 106 may include an image sensor and a processing device. The image sensor is used to scan text in a preset area, and the processing device may be used to extract the text in the preset area to obtain the text to be analyzed.
[0068] Optionally, when the grammar analysis device is a device with a grammar analysis function such as a dictionary pen, the grammar analysis device may further include a display device 107 .
[0069] Among them, the display device 107 is used for the electronic device to output display information, such as the grammatical parsing content and / or the first information in the embodiment of the present application.
[0070] Optionally, the grammar parsing device may further include a sound producing device 108 .
[0071] Among them, the sound-generating device 108 is used for the syntax parsing device to output sound information, such as the syntax parsing content in the embodiment of the present application.
[0072] In the embodiments of the present application, the specific structure of the execution subject of a syntax analysis method is not particularly limited in the embodiments of the present application, as long as it can communicate according to a syntax analysis method of the embodiments of the present application by running a program that records the code of the syntax analysis method of the embodiments of the present application. For example, the execution subject of a syntax analysis method provided in the embodiments of the present application can be a functional module in a syntax analysis device that can call and execute a program, or a syntax analysis device applied to a syntax analysis device, such as a chip. This application does not limit this.
[0073] like Figure 3 As shown, Figure 3 Taking a syntax analysis device as an example, a syntax analysis method provided in an embodiment of the present application is described, and the method includes:
[0074] Step 301: The grammar analysis device obtains the text to be analyzed and the user's grade information.
[0075] The syntax analysis device involved in the embodiments of the present application may be an electronic device or a server.
[0076] As an example, when the grammatical analysis device is an electronic device such as a dictionary pen, the dictionary pen can scan the text in the area to be recognized through the image sensor of the dictionary pen itself to obtain the text to be analyzed, or the dictionary pen can obtain the text to be analyzed from a server or other electronic devices. The embodiments of the present application are not limited to this.
[0077] Of course, when the execution subject of step 301 is, for example, a mobile phone or a portable apple device (PAD), if a grammar analysis APP is running on the mobile phone or PAD, the user can also input the text to be analyzed into the mobile phone or PAD with the help of the grammar analysis APP. Of course, when the mobile phone or PAD or dictionary pen has a voice collection function, the text to be analyzed can also be the content collected by the mobile phone or PAD or dictionary pen through the voice collection component.
[0078] As another example, when the grammar analysis device is a server, step 301 can be implemented in the following manner: the server obtains the text to be analyzed and the grade information of the user from the electronic device. For example, the dictionary pen can scan the text in the area to be recognized through the image sensor of the dictionary pen itself to obtain the text to be analyzed, and then send the obtained text to be analyzed and the grade information of the user registered in the dictionary pen to the server.
[0079] As an example, the user's grade information is used to determine the user's school age stage, such as junior high school, senior high school, or primary school. Alternatively, the user's grade information is used to determine which grade in the junior high school stage (such as the first grade of junior high school, the second grade of junior high school, and the third grade of junior high school), or which grade in the senior high school stage, which is not limited in the embodiments of the present application.
[0080] As an example, for example, the user's grade information may be the user's age, or the user's school age. The user's grade information may be input into the dictionary pen by the user, and this embodiment of the application does not limit this.
[0081] For example, when the user uses the dictionary pen for the first time or each time, the dictionary pen can prompt the user to input or verify whether the user's grade information is correct. Or the dictionary pen can prompt the user to verify whether the user's grade information is correct at every preset period, which is not limited in the present embodiment.
[0082] Step 302: The grammatical analysis device determines the grammatical analysis content of the text to be analyzed corresponding to the user's grade information according to the text to be analyzed and the user's grade information.
[0083] It can be understood that the grammatical analysis content of the text to be analyzed corresponding to the user's grade information means that if the user is in primary school, the grammatical analysis content of the text to be analyzed corresponding to the user's grade information includes content related to primary school, such as sentence component content, sentence type, life examples, grammar expansion, etc. of the text to be analyzed. If the user is in middle school, the grammatical analysis content of the text to be analyzed corresponding to the user's grade information includes content related to middle school, for example, in addition to the whole sentence translation content, it can also include tense, voice, etc.
[0084] The grammatical analysis content involved in the embodiments of the present application includes at least one of sentence component content, sentence pattern type, tense type, whole sentence translation content, and grammar expansion content.
[0085] Optionally, the higher the school age of the user indicated by the user's grade information, the grammatical parsing content includes the sentence component content, sentence pattern type, tense type and whole sentence translation content. The lower the school age of the user indicated by the user's grade information, the grammatical parsing content includes sentence component content, sentence pattern type, tense type and part of the whole sentence translation content. For example, if the user is in primary school, the grammatical parsing content output by the grammatical parsing device includes the whole sentence translation content and sentence component content.
[0086] The sentence type can be, for example, which sentence type the scanned content belongs to, such as the "subject + predicate" sentence pattern, "subject + predicate + object", "subject + predicate + double object", "subject + copula + predicate", "subject + predicate + indirect object + direct object", "subject + predicate + object + complement", etc.; the tense type can be, for example, which tense the scanned content belongs to, such as the present tense, present perfect tense, past future tense, etc.
[0087] For example, the sentence component content may be, for example, which word in the sentence is the predicate, which word is the subject, which word is the object, etc.
[0088] As an example but not limitation, in the embodiments of the present application, the content of the text to be analyzed is usually in English, and the target language corresponding to the translation of the text to be analyzed is Chinese.
[0089] As an example, the grammatical analysis device has a grammatical analysis library, which stores at least grammatical analysis content of one or more texts. The grammatical analysis content of each text has corresponding grade information, and the grammatical analysis content of each text adopts the sentence analysis content corresponding to the grade information corresponding to the grammatical analysis content of the text.
[0090] As an example, a grammatical analysis device has a grammatical parsing library, which stores at least grammatical parsing content of one or more texts. Among them, at least one text in the one or more texts corresponds to grammatical parsing content with different sentence analysis content. The grammatical parsing content with different sentence analysis content corresponding to the same text corresponds to different grade information. Therefore, when the grammatical analysis device obtains the text to be analyzed and the grade information of the user, it can search the grammatical parsing library for a target text that meets the requirements of similarity with the text to be analyzed, and then determine the grammatical parsing content that matches the user's grade information as the final result based on the user's grade information and the grade information corresponding to each grammatical parsing content in one or more grammatical parsing contents of the target text.
[0091] In the embodiment of the present application, the sentence analysis content may be sentence pattern analysis, sentence component analysis, grammatical analysis, tense analysis, voice analysis, and the like.
[0092] As another example, when the grammar analysis device is an electronic device, as an example, the grammar parsing library can be stored in an electronic device such as a dictionary pen, so that when the dictionary pen obtains the user's grade information and the text to be analyzed, the dictionary pen does not need to access the server to determine the grammar parsing content of the text to be analyzed corresponding to the user's grade information. For example, the electronic device can download the grammar parsing library from the server, and then store the downloaded grammar parsing library in the electronic device.
[0093] As another example, when the grammatical analysis device is an electronic device, if the electronic device does not have a grammatical analysis library, step 302 can be implemented in the following manner: the electronic device can determine the grammatical analysis content of the text to be analyzed corresponding to the user's grade information from the server. For example, the electronic device can send the text to be analyzed and the user's grade information to the server, and the server determines the grammatical analysis content of the text to be analyzed corresponding to the user's grade information from the grammatical analysis library based on the text to be analyzed and the user's grade information, and feeds it back to the electronic device.
[0094] As an example, when the syntax analysis device is an electronic device, if the syntax parsing library in the server is updated, the server may actively send the updated syntax parsing library to the electronic device.
[0095] For example, text A corresponds to two grammatical parsing contents A and grammatical parsing contents B. The grade information corresponding to grammatical parsing content A is the junior high school stage, and the grade information corresponding to grammatical parsing content B is the senior high school stage. When the text to be analyzed acquired by the dictionary pen is text A and the school age stage corresponding to the user's grade information is the senior high school stage, the dictionary pen determines that the grammatical parsing content of the text to be analyzed corresponding to the user's grade information is grammatical parsing content A.
[0096] It is worth noting that due to the large number of texts, when the grammatical analysis device obtains the text to be analyzed, the grammatical analysis device can determine the target text that matches the text to be analyzed from one or more texts based on the similarity between the text to be analyzed and one or more texts, and then use the grammatical analysis content in the grammatical analysis content of the target text that corresponds to the user's grade information as the grammatical analysis content of the text to be analyzed.
[0097] As an example, the sentence analysis contents corresponding to the grammatical parsing content A and the grammatical parsing content B are different. For example, the lower the school age corresponding to the user's grade information, the simpler the sentence analysis contents corresponding to the grammatical parsing content. The higher the school age corresponding to the user's grade information, the more detailed the sentence analysis contents corresponding to the grammatical parsing content.
[0098] As an example, the grammar analysis content in the primary school stage mainly presents grammar analysis content that is consistent with the key sentence patterns in the class, such as detailed explanations of sentence patterns.
[0099] For example, the result page at the primary school stage mainly presents grammatical analysis content that is consistent with the key sentence patterns in the course, such as sentence structure.
[0100] As an example, suppose a user uses a dictionary pen to scan a text to be analyzed. If the dictionary pen determines that the user is in primary school, the grammatical analysis content included in the recognition result page output by the dictionary pen may include relevant information about the sentence structure. The relevant information about the sentence structure may include, for example, a detailed explanation of the sentence structure, grammatical expansion, and the like.
[0101] As shown in Table 1, Table 1 is an exemplary elementary school grammar presentation content.
[0102]
[0103]
[0104] Or, the sentence analysis structure involved in the primary school stage includes: there be sentence pattern, then when the user inputs the text to be analyzed as there are two bed rooms, and a living room, the dictionary pen can output the grammatical analysis content as follows: The sentence analysis structure of the text to be analyzed is the there be sentence pattern, which means that there is something somewhere or something at a certain time. Among them, there are + countable noun plural form and other contents.
[0105] As another example, the grammar analysis content in middle school mainly presents text types, tense types (for example, Simple Present Tense, Simple Past Tense, Simple Future Tense, Present Continuous Tense, Past Continuous Tense, Present Perfect Tense, Past Perfect Tense), voice (Active and Passive Voice), text sentence analysis content, clause text, clause type and whole sentence content analysis.
[0106] For example, the school age stages corresponding to user A and user B are elementary school and high school respectively. The text to be analyzed scanned by user A using his dictionary pen is "I don't know, Uncle Booky". Then the grammatical analysis content of the text to be analyzed output by user A's dictionary pen corresponding to user A's grade information is "I don't+infinitive (+others)".
[0107] As an example, the grammatical analysis device determines the grammatical analysis content of the text to be analyzed based on the text to be analyzed and the grade information of the user, and the sentence analysis content of the grammatical analysis content corresponds to the grade information of the user, and further includes: the grammatical analysis device determines the grammatical analysis content of one or more texts corresponding to the grade information from the grammatical analysis library based on the grade information of the user, and then determines the grammatical analysis content of the text to be analyzed from the grammatical analysis content of the one or more texts based on the text to be analyzed. For example, the grammatical analysis content of the text to be analyzed is the grammatical analysis content of the text in one or more texts whose similarity with the text to be analyzed meets the requirements.
[0108] Step 303: The grammatical analysis device outputs grammatical analysis content of the text to be analyzed corresponding to the user's grade information.
[0109] As an example, taking the grammatical analysis device as a dictionary pen, the dictionary pen can display the grammatical analysis content of the text to be analyzed corresponding to the user's grade information on its display interface, or the user can use the voice player of the dictionary pen to play the grammatical analysis content of the text to be analyzed corresponding to the user's grade information.
[0110] Of course, when the dictionary pen communicates with other grammatical analysis devices (such as a tablet or a mobile phone), the dictionary pen can also display the grammatical analysis content of the text to be analyzed corresponding to the user's grade with the help of the display screen of the mobile phone or tablet, etc. The embodiment of the present application does not limit this.
[0111] As another example, when the grammatical analysis device is a server, step 303 may be implemented in the following manner: the server outputs the grammatical analysis content of the text to be analyzed corresponding to the user's grade information to the electronic device, and the electronic device displays it.
[0112] As an example, when the text to be analyzed corresponds to two or more grammatical analysis contents, each grammatical analysis content corresponds to different sentence analysis content.
[0113] For example, if the grammar parsing device obtains "the content of the text to be analyzed is "I've had this magazine for a couple of months." and the user's grade information indicates that the user is in middle school, then the grammar parsing content of the text to be analyzed is shown in Table 2:
[0114] Table 2
[0115]
[0116] For example, if the text to be analyzed is “The children were tired after the picnic”, the grammar analysis device may output grammar analysis content as shown in Table 3.
[0117] Table 3
[0118]
[0119]
[0120] In a possible implementation of the present application, step 303 can be implemented in the following manner: the grammatical analysis device outputs the grammatical parsing content of the text to be analyzed corresponding to the user's grade information, as well as the grammatical parsing content of other school age stages corresponding to the text to be analyzed in addition to the grammatical parsing content of the text to be analyzed corresponding to the user's grade information.
[0121] When in use, taking the grammatical analysis device as a dictionary pen as an example, the user can set the user's age or school age stage (for example, primary school stage or junior high school stage) in the dictionary pen. At this time, when the user uses the dictionary pen to scan the content to be identified as "The children were tired after the picnic", if the user's school age stage is junior high school stage, the grammatical analysis content output by the dictionary pen not only includes: the grammatical analysis content corresponding to [primary school stage], such as Subject (subject) + Link.V (link.verb) + Predicate (predicate), where the link verb "tired" indicates the state; it also includes the grammatical analysis content corresponding to [middle school stage], the basic sentence pattern [declarative sentence] + tense [past tense] + voice [active] + text structure [subject + link + predicate] + whole sentence analysis description, this sentence is a simple sentence structure, The is a determiner, which plays a limiting role in front of the noun children, etc.
[0122] Table 4
[0123]
[0124] As an example, the user information can be the user's grade, or the user's age group, etc. For example, when the user uses the dictionary pen for the first time or once every once in a while, the dictionary pen can output a prompt interface to prompt the user to enter user information, or prompt the user to verify the user information that has been entered. After the user enters the user information based on the prompt of the dictionary pen, the dictionary pen can obtain the user's user information.
[0125] For example, the user's grade may be junior high school, senior high school, etc. For another example, the user's grade may be the first grade of junior high school, the second grade of junior high school, the third grade of junior high school, etc.
[0126] As an example, the dictionary pen can obtain the text to be analyzed in the following ways. For example, an image sensor is installed in the dictionary pen. When a user encounters a text to be analyzed, the user can use the image sensor to scan the text to be analyzed so that the grammar analysis device obtains the text to be analyzed. Of course, in addition to this, the dictionary pen can also obtain the text to be analyzed from a third-party device or a cloud server, and the embodiments of the present application do not limit this.
[0127] Optionally, before the dictionary pen outputs the grammatical analysis content of the text to be analyzed corresponding to the user's grade information, the dictionary pen can also download the textbook file currently being studied by the user, obtain the textbook name scanned by the dictionary pen, query the corresponding textbook file according to the textbook name, and download the textbook file. Exemplarily, when the user wants to download the electronic textbook corresponding to the paper textbook currently being studied in the dictionary pen, the dictionary pen is used to scan the textbook name of the paper textbook, the dictionary pen recognizes the textbook name, and queries the corresponding electronic textbook from the pre-entered textbooks and downloads it.
[0128] In a possible implementation of the present application, in a case where the grammatical analysis library stores grammatical parsing content corresponding to one or more texts in textbooks of different grades, if the text to be analyzed input by the user belongs to one or more texts, that is, the text to be analyzed input by the user is the in-class content, then the grammatical parsing library can determine the grammatical parsing content of the text to be analyzed corresponding to the user's grade information with the help of the grammatical parsing content corresponding to one or more texts in the grade textbook stored in the local grammatical analysis library and the user's grade information.
[0129] For another example, when the grammatical analysis library only stores the grammatical analysis content corresponding to one or more texts in the textbook corresponding to the user's grade information, if the text to be analyzed input by the user does not belong to one or more texts, that is, the text to be analyzed input by the user exceeds the grade corresponding to the user, then in this case, the grammatical analysis device such as the dictionary pen can obtain the grammatical analysis content of the text to be analyzed corresponding to the user's grade information with the help of the server. For example, when the user is using the dictionary pen, the user is in middle school, but the dictionary pen stores the grammatical analysis library corresponding to the elementary school stage downloaded from the server by the dictionary pen. Therefore, the dictionary pen can obtain the grammatical analysis content of the text to be analyzed corresponding to the user's grade information from the server when it is determined that the user's grade does not correspond to the grade of the grammatical analysis library stored in the dictionary pen. Optionally, the server can also prompt the user to update the grammar database stored in the dictionary pen.
[0130] For another example, when the grammatical analysis library stores grammatical analysis contents corresponding to one or more texts in textbooks corresponding to different grades, if the text to be analyzed input by the user does not belong to one or more texts, that is, the text to be analyzed input by the user belongs to content outside the textbook (that is, extracurricular content), then the grammatical analysis device can obtain the whole sentence analysis content of the text to be recognized from the server, that is, it not only includes basic sentence structure analysis, but also includes semantics, tense, voice, grammatical analysis and other contents.
[0131] like Figure 4 As shown, Figure 4A syntax parsing method provided in an embodiment of the present application includes:
[0132] Step 401: The server determines the grammatical display attributes that need to be displayed for different grade information.
[0133] Among them, the grammar display attribute is used to reflect the sentence analysis content displayed in different grades.
[0134] For example, since the learning focus of sentences in primary school and middle school is different, for example, the primary school may not have learned clauses and grammar-related knowledge, while the users in the middle school have begun to be exposed to grammar-related knowledge, the sentence analysis content required to be mastered in the primary school and middle school stages can be based on the curriculum standards. For example, the grammatical analysis content in the primary school stage can mainly include the basic sentence structure analysis of the text to be analyzed as the grammatical display attribute. For example, the middle school stage uses basic sentence structure, grammatical structure analysis, tense (for example, future tense, present perfect tense, present tense, imperative sentence, etc.), voice, etc. as grammatical display attributes.
[0135] Step 402: The server obtains the grade information corresponding to each text in one or more texts and the grammatical analysis content corresponding to each text.
[0136] As an example, the one or more texts may be textbook sentences in teaching textbooks used in different grades.
[0137] As an example, a certain amount of representative textbook sentences can be manually screened out, and the grammatical analysis content corresponding to each sentence, that is, the sentence analysis content of the sentence, etc. can be manually marked, and then stored in a server or a grammatical analysis device.
[0138] For example, the following is a sentence selected from a primary school textbook: How long does it take to get to Shanghai from Beijing by train? It takes about five hours.
[0139]
Content of sentence analysis
[0140] Question: How long does it take to get to+place+from+location+mode of transportation?
[0141] Answer: It takes about + time.
[0142] Step 403: The server marks the grade information and grammatical analysis content of each text, so that each text corresponds to at least one grade information, and the grammatical display attributes and grammatical analysis content corresponding to each grade information.
[0143] As an example, the above step 402 can be implemented in the following manner: the server obtains the grammatical parsing content corresponding to each target text in one or more target texts. The server obtains multiple texts. According to the confidence between the multiple texts and each target text, the target text corresponding to each text is determined; according to the target text corresponding to each text, the grammatical parsing content corresponding to each text is determined, and the grammatical parsing content corresponding to any text is the same as the grammatical parsing content of the target text corresponding to any text.
[0144] As an example, the multiple texts may be texts existing in textbooks of different grades. The target text may be a key sentence existing in textbooks of different grades, and the target text has a typical meaning in the textbook, such as the sentence pattern of the target text involves a key sentence pattern, etc. The target text may be a sentence manually selected from the textbook and provided to the server, and the embodiments of the present application do not limit this.
[0145] Due to the large number of sentences in the textbook, it is impossible to accurately give different sentence analysis content for each text, and some texts in the textbook are similar, so it is necessary to generalize similar texts into a category of sentences. After scanning the texts of the same category, the same sentence analysis content is given, as shown in Table 5.
[0146] Table 5
[0147] I don't know. I don't + the infinitive of the verb (+ other). I don't know, Uncle Booky. I don't + the infinitive of the verb (+ other). I don't like this hat! I don't + the infinitive of the verb (+ other). I don't like this hat! I don't + the infinitive of the verb (+ other). I don't want to buy a dress. I don't + the infinitive of the verb (+ other).
[0148] Taking the target text "I don't know" as an example, the grammatical analysis content of "I don't know" is manually annotated in advance, that is, the sentence analysis content of "I don't know" is: I don't+infinite verb (+others). If the acquired text is "Idon't know, Uncle Booky.", etc., the server determines the confidence of "I don't know", "Uncle Booky" and "I don't know". If the confidence meets the requirements, the sentence analysis content of "I don't know, Uncle Booky" is determined to be "Idon't+infinite verb (+others).
[0149] It is understandable that each device, such as an electronic device or a server, includes a structure and / or software module corresponding to each function in order to implement the above functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0150] The embodiment of the present application can divide the functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0151] Combined with the above Figures 1 to 4 , the method of the embodiment of the present application is described, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the grammar analysis device provided by the embodiment of the present application can execute the steps performed by the electronic device and the server in the above-mentioned grammar analysis method.
[0152] In the case of integrated units, Figure 5 The grammatical analysis device involved in the above embodiment is shown. The grammatical analysis device can be an electronic device or a server, or a device applied in an electronic device or a server, such as a chip or a processing circuit. The grammatical analysis device can include: a first acquisition unit 510, a determination unit 520 and an output unit 530.
[0153] The first acquisition unit 510 is used to acquire the text to be analyzed and the grade information of the user.
[0154] The determination unit 520 is used to determine the grammatical analysis content of the text to be analyzed according to the text to be analyzed and the grade information of the user. The sentence analysis content of the grammatical analysis content corresponds to the grade information of the user;
[0155] The output unit 530 is used to output the grammatical analysis content of the text to be analyzed corresponding to the user's grade information.
[0156] As an example, the determination unit 520 is specifically used to determine the grammatical parsing content of the text to be analyzed from a grammatical parsing library based on the text to be analyzed and the grade information of the user, and the grammatical parsing library stores at least the grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each of the grammatical parsing contents is consistent with the grade information corresponding to the text.
[0157] As another example, the determination unit 520 is specifically used to determine the grammatical parsing content of the text to be analyzed from the server according to the text to be analyzed and the grade information of the user. The server has a grammatical parsing library, which stores at least grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text.
[0158] As an example, the first acquisition unit 510 is specifically configured to acquire the text to be analyzed and the user's grade information from the dictionary pen.
[0159] In the case of integrated units, Figure 6 The grammatical analysis device involved in the above embodiment is shown. The grammatical analysis device can be a server or a device applied in the server, such as a chip or a processing circuit. The grammatical analysis device can include: a second acquisition unit 610, a determination unit 620 and a processing unit 630.
[0160] As an example, the determination unit 620 is used to determine the grammar display attributes that need to be displayed for different grade information and the grammar parsing content to be displayed corresponding to each of the grammar display attributes, wherein the grammar display attributes are used to reflect the sentence analysis content required by users of different grades;
[0161] A second acquisition unit 610 is used to acquire sentence analysis content corresponding to each text in one or more texts;
[0162] The processing unit 630 is used to mark the grade information and grammatical display attributes of each text according to the sentence analysis content corresponding to each text, so that each text corresponds to at least one grade information, and the grammatical display attributes and grammatical analysis content corresponding to each grade information.
[0163] 5. The method according to claim 4, characterized in that the step of obtaining sentence analysis content corresponding to each of the one or more texts comprises:
[0164] Obtaining a library of association relationships between one or more target texts and sentence analysis content;
[0165] Get multiple texts;
[0166] Classifying the plurality of texts according to the confidence between the plurality of texts and each of the target texts to obtain one or more texts;
[0167] The sentence analysis content of a text belonging to the same category as the target text is set as the sentence analysis content of the target text.
[0168] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the grammatical parsing method shown in any of the above embodiments is implemented.
[0169] An embodiment of the present application also provides a computer program product. When the computer program product runs on a server, the server executes the grammatical parsing method shown in any of the above embodiments.
[0170] Figure 7 1 is a schematic diagram of the structure of a chip 130 provided in an embodiment of the present application. The chip 130 includes one or more than two (including two) processors 1310 and a communication interface 1330 .
[0171] Optionally, the chip 130 further includes a memory 1340, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 1310. A portion of the memory 1340 may also include a non-volatile random access memory (NVRAM).
[0172] In some embodiments, the memory 1340 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.
[0173] In the embodiment of the present application, the corresponding operation is performed by calling the operation instruction stored in the memory 1340 (the operation instruction may be stored in the operating system).
[0174] One possible implementation is that the structures of the server and the electronic device are similar, and different devices may use different chips to implement their respective functions.
[0175] The processor 1310 controls the processing operation of any of the server and the electronic device, and the processor 1310 may also be referred to as a central processing unit (CPU).
[0176] The memory 1340 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1310. A portion of the memory 1340 may also include an NVRAM. For example, in an application, the memory 1340, the communication interface 1330, and the memory 1340 are coupled together via a bus system 1320, wherein the bus system 1320 may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, in Figure 7 Various buses are labeled as bus system 1320 .
[0177] The method disclosed in the above embodiment of the present application can be applied to the processor 1310, or implemented by the processor 1310. The processor 1310 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1310. The above processor 1310 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1340, and the processor 1310 reads the information in the memory 1340 and completes the steps of the above method in combination with its hardware.
[0178] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0179] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0180] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0181] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0182] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0183] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0185] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0186] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A syntax parsing method, characterized in that: The method comprises: Get the text to be analyzed and the user's grade information; Determining grammatical analysis content of the text to be analyzed according to the text to be analyzed and the grade information of the user, wherein the grammatical analysis content corresponds to the grade information of the user; Output the grammatical analysis content of the text to be analyzed corresponding to the grade information of the user.
2. The method according to claim 1, characterized in that The step of determining the grammatical analysis content of the text to be analyzed according to the text to be analyzed and the grade information of the user includes: According to the text to be analyzed and the grade information of the user, the grammatical parsing content of the text to be analyzed is determined from a grammatical parsing library, wherein the grammatical parsing library at least stores the grammatical parsing content of one or more texts, wherein each of the one or more texts is marked with grade information, and the sentence analysis content corresponding to each grammatical parsing content is consistent with the grade information corresponding to the text.
3. The method according to claim 1 or 2, characterized in that: The obtaining of the text to be analyzed and the user's grade information includes: Get the text to be analyzed and the user's grade information from the dictionary pen.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Determine the grammar display attributes that need to be displayed for different grade information and the sentence analysis content to be displayed corresponding to each grammar display attribute, wherein the grammar display attribute is used to reflect the sentence analysis content required by users of different grades; Determine the grammatical analysis content corresponding to each text in one or more texts and the grade information corresponding to each of the texts; According to the grammatical analysis content corresponding to each text and the grade information corresponding to each text, the grade information and grammatical display attributes of each text are marked so that each text corresponds to at least one grade information, and the grammatical display attributes and the grammatical analysis content corresponding to each grade information.
5. The method according to claim 4, characterized in that The step of determining the syntax analysis content corresponding to each of the one or more texts includes: Obtaining grammatical parsing content corresponding to each of the target texts in one or more target texts; obtaining one or more of said texts; Determining the target text corresponding to each of the texts according to the confidence between the plurality of texts and each of the target texts; The corresponding target text is obtained according to each of the texts, and the grammatical parsing content corresponding to each of the texts is determined. The grammatical parsing content corresponding to any of the texts is the same as the grammatical parsing content of the target text corresponding to any of the texts.
6. A grammar analysis device, characterized in that: The device comprises: A first acquisition unit, used to acquire the text to be analyzed and the grade information of the user; A determination unit, configured to determine, according to the text to be analyzed and the grade information of the user, a grammatical analysis content of the text to be analyzed, wherein the grammatical analysis content corresponds to the grade information of the user; The output unit is used to output the grammatical analysis content of the text to be analyzed corresponding to the grade information of the user.
7. A grammar parsing device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the grammar parsing method according to any one of claims 1 to 5.
8. The grammar parsing device according to claim 7, characterized in that: The grammar parsing device is a dictionary pen, and the dictionary pen has an image sensor, and the image sensor is used to collect the text to be analyzed.
9. A grammar parsing system, characterized in that: The system comprises: an electronic device and a server, wherein a grammar parsing library is stored in the server, wherein the grammar parsing library at least stores grammar parsing contents of one or more texts, wherein each of the one or more texts is marked with grade information, and sentence analysis contents corresponding to each grammar parsing content are adapted to the grade information corresponding to the text; The electronic device is used to obtain the text to be analyzed and the grade information of the user, and is used to obtain and output the grammatical analysis content of the text to be analyzed corresponding to the grade information of the user from the server according to the text to be analyzed and the grade information of the user.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the grammar analysis method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
English grammar display method, device thereof and equipment
CN113658463A
Self-adaptive word card example sentence generation method and system
CN116303879A
Systems and methods for dynamic personalized reading instruction
US20030093275A1
Cited By
Data display method, dictionary pen, electronic device, storage medium and program product
CN121143670A
Adaptive syntax parsing system and method
CN122655754A