Work character attribute discrimination method and device, medium and electronic equipment

By identifying and analyzing the personal pronouns and personal pronouns of the work characters in the text, and determining their referential relationships, the problem of low efficiency in identifying work character attributes in the existing technology is solved, and efficient and accurate character attribute identification is achieved.

CN118798165APending Publication Date: 2024-10-18BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310396496.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the text analysis process, it takes a lot of time and human resources to determine the attributes of the characters in the work. It is difficult for existing technology to efficiently and accurately identify and determine the referential relationship between the personal names and personal pronouns of the characters in the work.

Method used

By identifying the person and personal pronoun of the work character in the target text, determine the probabilistic feature information that the personal pronoun refers to the target work character, and then determine the target personal pronoun, and accurately determine the role attributes of the work character based on this information.

Benefits of technology

It achieves efficient and accurate identification of character attributes for work characters, reduces the waste of human resources, and improves analysis efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798165A_ABST
    Figure CN118798165A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a character character attribute distinguishing method and device, a medium and electronic equipment. The method comprises the following steps: identifying target words in a target text, wherein the target words comprise personal and personal pronouns of a work role; determining anaphora feature information between the person of the target work role and the person pronouns, the anaphora feature information being used for representing the probability that the person pronouns refer to the target work role, and the person of the target work role being called the person of any one of the recognized persons of the work roles; according to the anaphora feature information, determining a target personal pronoun of the anaphora target work role; and determining role attribute information of the target work role according to the role attribute information corresponding to the target personal pronouns. Therefore, through the role attribute information corresponding to the target personal pronouns, the role attribute information of the target work role can be accurately and efficiently determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a method, device, medium and electronic device for determining character attributes of a text work. Background Art

[0002] In the process of analyzing a text, it is usually necessary to analyze the specific roles involved in the text to determine the role attributes in the text. However, if relevant personnel read the text in advance to analyze the roles of the work to determine the role attribute information of the roles involved in the text, it will take a lot of time and waste human resources. Summary of the invention

[0003] This section is provided to introduce the concepts in a brief form, which will be described in detail in the detailed implementation section below. This section is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.

[0004] In a first aspect, the present disclosure provides a method for determining character attributes of a text work, comprising:

[0005] Identifying target words in the target text, wherein the target words include the names and personal pronouns of characters in the work;

[0006] Determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters;

[0007] Determining, according to the reference feature information, a target personal pronoun that refers to the character of the target work;

[0008] According to the role attribute information corresponding to the target personal pronoun, the role attribute information of the role of the target work is determined.

[0009] In a second aspect, the present disclosure provides a device for determining character attributes of a text work, comprising:

[0010] A recognition module, used to recognize target words in the target text, wherein the target words include the names and personal pronouns of the characters in the work;

[0011] A first determination module is used to determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters;

[0012] A second determination module is used to determine a target personal pronoun referring to the character of the target work according to the reference feature information;

[0013] The third determination module is used to determine the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun.

[0014] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-mentioned method for determining the character attributes of a text work.

[0015] In a fourth aspect, the present disclosure provides an electronic device, including:

[0016] a storage device having a computer program stored thereon;

[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned method for determining the character attributes of a text work.

[0018] Through the above technical solution, for a given target text, the person and personal pronouns of the work characters in the target text can be identified, and then the reference feature information between the person and personal pronoun of the target work character can be determined, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character. Through the reference feature information, the target personal pronoun referring to the target work character can be determined, that is, the target personal pronoun that describes the same person as the person of the target work character can be determined from multiple personal pronouns. In this way, through the role attribute information corresponding to the target personal pronoun, the role attribute information of the target work character can be accurately and efficiently determined.

[0019] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale. In the drawings:

[0021] Figure 1 It is a flowchart of a method for distinguishing character attributes of a text work provided according to an embodiment of the present disclosure.

[0022] Figure 2 It is a block diagram of a device for distinguishing character attributes of a text work provided according to an embodiment of the present disclosure.

[0023] Figure 3It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] All actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0035] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] Figure 1 1 is a flowchart of a method for determining the character attributes of a text work according to an embodiment of the present disclosure. The method can be applied to terminals, such as smart phones, tablet computers, personal computers (PCs), laptop computers, and other devices, and can also be applied to servers. Figure 1 As shown, the method may include S101 to S104.

[0037] S101, identifying target words in the target text, where the target words include person names and personal pronouns of characters in the work.

[0038] The person name of the work character refers to the name of the work character, for example, it can include Zhang San, Li Si, etc. Personal pronouns refer to words that can be used to refer to a specific work character, for example, it can include words such as he, girl, handsome guy, etc.

[0039] For example, the target words in the target text can be identified based on a pre-trained entity recognition model. For example, the entity recognition model can be a baseline model of BERT+CRF. Specifically, the target text can be input into the pre-trained entity recognition model, and the model output result obtained is the target word in the target text. It is worth noting that the entity recognition model can be a machine learning model trained by machine learning and capable of identifying the target words in the target text. The training samples of the entity recognition model can be personal pronouns and work character pronouns provided by an open source database. The entity recognition model can be stored locally, for example, and called locally each time it is used, or it can be stored on a third-party platform and called from a third party each time it is used. There is no specific limitation here.

[0040] S102, determining the reference feature information between the person name and personal pronouns of the character in the target work.

[0041] The reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the target work character's person pronoun is any of the identified work characters' person pronouns.

[0042] For example, the reference feature information between the person and personal pronouns of the character in the target work can be determined based on a pre-trained reference resolution model. Specifically, the target text marked with the target words can be input into the pre-trained reference resolution model, and the model output result obtained is the reference feature information between the person and personal pronouns of the character in the target work. It is worth noting that the reference resolution model can be a machine learning model that is trained based on the first historical text and obtained by machine learning, and can determine the reference feature information between the person and personal pronouns of the character in the target work. The reference resolution model can, for example, be stored locally and called locally each time it is used, or it can be stored on a third-party platform and called from a third party each time it is used, which is not specifically limited here.

[0043] In order to improve the reliability of the output results of the coreference resolution model, the first historical text used to train the coreference resolution model can be a text in the same field as the target text. For example, if the target text is related to the martial arts field, a text related to the martial arts field can be selected as the first historical text to train the coreference resolution model.

[0044] S103, determining a target personal pronoun referring to a character in the target work according to the reference feature information.

[0045] The reference feature information can be used to represent the probability that the personal pronoun refers to the target work character, that is, the reference feature information can be used to represent the probability that the personal pronoun and the target work character correspond to the same person. By comparing the probability represented by the reference feature information with the comparison result of the preset probability threshold, the target personal pronoun that can refer to the target work character can be determined from the personal pronouns.

[0046] S104, determining the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun.

[0047] For example, the correspondence between personal pronouns and role attribute information can be preset, and the correspondence can be stored in the form of a mapping table, a database, etc. For example, the role attribute information can include a first role attribute and a second role attribute, wherein the role attribute information can include gender attribute information of the text work role, the first role attribute can be, for example, the text work role is male, and the second role attribute can be, for example, the text work role is female. The personal pronouns corresponding to the male text work role can include he, young man, uncle, etc.; the personal pronouns corresponding to the female text work role can include she, girl, etc.; for personal pronouns that cannot clearly represent the gender attribute of the text work role, such as words such as teacher, the personal pronoun can be determined as an invalid personal pronoun, that is, the role attribute information of the personal pronoun is not used to determine the role attribute information of the work role. The number of target personal pronouns corresponding to the role attribute information of the first role attribute and the number of target personal pronouns corresponding to the role attribute information of the second role attribute can be determined, and the role attribute information corresponding to the largest number is determined as the role attribute information of the target work role.

[0048] Taking the target work character "Zhang San" as an example, if the corresponding target personal pronouns include "he", "girl", and "they", the role attribute information corresponding to the target personal pronouns "he" and "they" is that the text work character is male (first role attribute), and the role attribute information corresponding to the target personal pronoun "girl" is that the text work character is female (second role attribute), then it can be determined that the text work character gender attribute information in the role attribute information of the target work character "Zhang San" is that the text work character is male.

[0049] Thus, through the above-preset correspondence between personal pronouns and role attribute information, the role attribute information corresponding to the target personal pronoun can be simply and quickly determined. The target personal pronoun can refer to the target work character, that is, the two describe the same person. Therefore, through the role attribute information corresponding to the target personal pronoun, the role attribute information of the target work character can be accurately and efficiently determined.

[0050] Through the above technical solution, for a given target text, the person and personal pronouns of the work characters in the target text can be identified, and then the reference feature information between the person and personal pronoun of the target work character can be determined, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character. Through the reference feature information, the target personal pronoun referring to the target work character can be determined, that is, the target personal pronoun that describes the same person as the person of the target work character can be determined from multiple personal pronouns. In this way, through the role attribute information corresponding to the target personal pronoun, the role attribute information of the target work character can be accurately and efficiently determined.

[0051] Optionally, in S103, determining a target personal pronoun referring to a character in a target work according to the reference feature information may include:

[0052] Determining target reference feature information whose represented probability is greater than a preset probability threshold;

[0053] The personal pronoun corresponding to the target referential feature information is determined as the target personal pronoun.

[0054] As described above, the reference feature information can be used to characterize the probability that the personal pronoun refers to the character of the target work. By comparing the probability represented by the reference feature information with a preset probability threshold, the target personal pronoun that can refer to the character of the target work can be determined from the identified personal pronouns.

[0055] For example, the probability threshold can be preset, for example, it can be set to 0.6. If the probability that the reference feature information is used to characterize that the personal pronoun refers to the target work character is 0.4, it can be determined that the reference feature information is not the target reference feature information, and the personal pronoun corresponding to the reference feature information is not the target personal pronoun, and the personal pronoun cannot be used to determine the role attribute information of the target work character. If the probability that the reference feature information is used to characterize that the personal pronoun refers to the target work character is 0.8, it can be determined that the reference feature information is the target reference feature information, and the personal pronoun corresponding to the target reference feature information is the target personal pronoun, and the personal pronoun can be used to determine the role attribute information of the target work character.

[0056] Taking the target work character "Zhang San" as an example, if the probability represented by the corresponding reference feature information between the personal pronoun "he" and the target work character "Zhang San" is greater than the preset probability threshold, it can be determined that the personal pronoun "he" is the target personal pronoun of the target work character "Zhang San"; if the probability represented by the corresponding reference feature information between the personal pronoun "Ms." and the target work character "Zhang San" is less than the preset probability threshold, it can be determined that the personal pronoun "Ms." is not the target personal pronoun of the target work character "Zhang San".

[0057] Optionally, in S104, determining the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun may include:

[0058] Determine a first number of target personal pronouns corresponding to role attribute information being a first role attribute, and a second number of target personal pronouns corresponding to role attribute information being a second role attribute;

[0059] If the difference between the first number and the second number is greater than a preset difference threshold, the character attribute information corresponding to the largest one of the first number and the second number is determined as the character attribute information of the character of the target work.

[0060] For example, the role attribute information corresponding to each target personal pronoun can be simply and quickly determined through the correspondence between the pre-set personal pronouns and the role attribute information as described above. For example, the role attribute information may include a first role attribute and a second role attribute, wherein the role attribute information may include the gender attribute information of the text work role, the first role attribute may be, for example, the text work role is male, and the second role attribute may be, for example, the text work role is female. After determining the role attribute information corresponding to each target personal pronoun, the target personal pronouns may be classified according to the determined role attribute information, and then the first number of target personal pronouns corresponding to the role attribute information of the first role attribute and the second number of target personal pronouns corresponding to the role attribute information of the second role attribute are determined. If there are target personal pronouns that cannot clearly represent the gender attribute of the text work role, they can be determined as invalid target personal pronouns, and these invalid target personal pronouns may not be used to determine the role attribute information of the target work role.

[0061] The difference threshold may be preset, for example, may be set to 3. If the first number is 9 and the second number is 4, it may be determined that the role attribute information corresponding to the first number is the role attribute information of the target work role, and the first number is used to characterize the number of target personal pronouns corresponding to the role attribute information being the male text work role (first role attribute), therefore, it may be determined that the text work role gender attribute information in the role attribute information of the target work role is the male text work role.

[0062] If the first number and the second number are very close, it can be determined that the direction of the character attribute information of the target work character is not obvious. For example, if the first number is 6 and the second number is 7, it can be determined that the probability of the character attribute information of the target work character determined based on the target personal pronoun being the first character attribute or the second character attribute is almost the same. At this time, if the character attribute information corresponding to the larger one of the first number and the second number is directly determined as the character attribute information of the target work character, the accuracy of the determined character attribute information of the target work character may not be ideal.

[0063] Therefore, in S104, determining the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun may also include:

[0064] If the difference between the first number and the second number is not greater than the difference threshold, the role attribute information of the role of the target work is obtained through a pre-trained text work role attribute discrimination model; or, request information is generated.

[0065] The request information is used to request manual determination of role attribute information of the role of the target work.

[0066] For example, the pre-trained text work role attribute discrimination model can be a Bayesian model, which can judge the role attribute information of the target work role based on the person of the target work role itself, wherein the role attribute information can include the gender attribute information of the text work role. The Bayesian model can be trained in advance by machine learning, and its training samples can include a large number of work role names and the role attribute information corresponding to each work role name. If the difference between the first number and the second number is not greater than the difference threshold, the person corresponding to the target work role can be input into the pre-completed text work role attribute discrimination model, and the output result of the model is the role attribute information of the target work role. The Bayesian model can be stored locally, for example, and called locally each time it is used, or it can be stored on a third-party platform and called from a third party each time it is used, which is not specifically limited here.

[0067] As another example, if the difference between the first number and the second number is not greater than the difference threshold, a request message may be generated. For example, a request message of "please manually determine the role attribute information of the target work role" may be generated, and the request message may be sent to a terminal device (such as a smart phone) held by a relevant person, and the request message may be displayed on a display screen of the terminal device to seek manual assistance, thereby ensuring the accuracy of the role attribute information of the target work role finally determined.

[0068] As another example, the above Bayesian model can output the accuracy of the result, i.e., the probability that the result is a correct result, while outputting the character attribute information of the target work character. If the accuracy of the output result is lower than the accuracy threshold, the request information is regenerated. In this way, the accuracy of the character attribute information of the target work character can be ensured while further reducing the use of manpower.

[0069] Optionally, in S102, determining the reference feature information between the person of the character in the target work and the personal pronoun may include:

[0070] Slice the target text to obtain multiple text slices;

[0071] Determine a target text slice containing the person names of characters in the target work;

[0072] Determine the reference feature information between the person of the target work character contained in the target text slice and the personal pronoun in the target text slice.

[0073] For example, the target text can be sliced ​​according to a preset slice length, and the content in each slice segment is determined as a text slice. For example, the target text can be sliced ​​once every ten sentences. If the target text contains 100 sentences in total, 10 text slices can be obtained. In this way, by determining the reference feature information between the person of the target work role contained in the target text slice and the personal pronoun in the target text slice, it is possible to avoid mixing too many work roles in a text, so as to reduce the possibility of errors in the determined reference feature information.

[0074] As another example, the target text can be sliced ​​according to a preset slice length, and the contents of every two adjacent slice segments can be determined as the same text slice. For example, the target text can be sliced ​​every five sentences, so the first sentence to the tenth sentence in the text is a text slice, the fifth sentence to the fifteenth sentence in the text is a text slice, the tenth sentence to the twentieth sentence in the text is a text slice, and so on. In this way, there are overlapping parts in two adjacent text slices, which can increase the number of target text slices and ensure that each text slice has a certain length; the probability of personal pronouns that refer to the same character as the target work being concentrated in the same text slice is increased, so as to improve the accuracy of the determined reference feature information.

[0075] At the same time, for the target text slice containing the name of the target work character, the step of determining the reference feature information between the name of the target work character contained in the target text slice and the personal pronoun in the target text slice is performed, which can reduce the amount of text processing and avoid energy waste. For example, after slicing the target text, a total of 10 text slices are obtained, but there are 5 target text slices containing the name of the target work character. Then, the reference feature information between the name of the target work character contained in these 5 target text slices and the personal pronoun in the target text slice can be determined, and the other 5 text slices are not processed. In this way, the amount of data processing can be reduced and energy waste can be avoided.

[0076] Optionally, the reference feature information between the person of the character in the target work and the personal pronoun is determined based on the feature vector corresponding to the person of the character in the target work and the feature vector corresponding to the personal pronoun.

[0077] Among them, the feature vector is used to represent the semantics of the corresponding word and its position in the target text.

[0078] For example, the feature vector corresponding to each target word can be determined based on a pre-trained neural network model. The neural network model can be pre-trained by machine learning, and its training samples can include a second historical text annotated with multiple historical target words, wherein each historical target word is also annotated with the semantics of the historical target word and the position in the second historical text. The target text annotated with the target words can be input into the pre-trained neural network model, and the model output result obtained is the feature vector of the target word. The neural network model can be stored locally, for example, and called locally each time it is used, or it can be stored on a third-party platform and called from a third party each time it is used, which is not specifically limited here.

[0079] The reference feature information between the name of the character in the target work and the personal pronoun can be determined based on the similarity between the feature vector corresponding to the name of the character in the target work and the feature vector corresponding to the personal pronoun. The smaller the difference between the feature vector corresponding to the name of the character in the target work and the feature vector corresponding to the personal pronoun, and the higher the similarity, the greater the probability represented by the determined reference feature information; the larger the difference between the feature vector corresponding to the name of the character in the target work and the feature vector corresponding to the personal pronoun, and the lower the similarity, the smaller the probability represented by the determined reference feature information.

[0080] Optionally, the method for determining the character attributes of a text work provided by the present disclosure may further include:

[0081] The person names of each identified work character are taken as the person names of the target work characters in turn, so as to determine the role attribute information of each work character appearing in the target text.

[0082] As mentioned above, the person name of the target work character can be any of the identified work characters, and there are very likely to be multiple work character names in the target text. Therefore, the person name of each identified work character can be used as the person name of the target work character in turn to complete the determination of the role attribute information of all the work characters appearing in the target text.

[0083] Based on the same inventive concept, the present disclosure also provides a device for determining the character attributes of a text work. Figure 2 It is a block diagram of a device for distinguishing character attributes of a text work provided according to an embodiment of the present disclosure.

[0084] like Figure 2 As shown, the text work role attribute determination device 200 may include:

[0085] Recognition module 201, used to recognize target words in the target text, wherein the target words include the names and personal pronouns of the characters in the work;

[0086] The first determination module 202 is used to determine the reference feature information between the person name of the target work character and the personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the person name of the target work character is the person name of any work character among the identified person names of the work characters;

[0087] The second determination module 203 is used to determine the target personal pronoun referring to the character of the target work according to the reference feature information;

[0088] The third determination module 204 is used to determine the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun.

[0089] Through the above technical solution, for a given target text, the person and personal pronouns of the work characters in the target text can be identified, and then the reference feature information between the person and personal pronoun of the target work character can be determined, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character. Through the reference feature information, the target personal pronoun referring to the target work character can be determined, that is, the target personal pronoun that describes the same person as the person of the target work character can be determined from multiple personal pronouns. In this way, through the role attribute information corresponding to the target personal pronoun, the role attribute information of the target work character can be accurately and efficiently determined.

[0090] Optionally, the second determining module 203 includes:

[0091] A first determination submodule is used to determine target reference feature information whose represented probability is greater than a preset probability threshold;

[0092] The second determination submodule is used to determine the personal pronoun corresponding to the target reference feature information as the target personal pronoun.

[0093] Optionally, the third determining module 204 includes:

[0094] A third determination submodule is used to determine a first number of target personal pronouns corresponding to the role attribute information being a first role attribute, and a second number of target personal pronouns corresponding to the role attribute information being a second role attribute;

[0095] The fourth determination submodule is used to determine the role attribute information corresponding to the largest one of the first number and the second number as the role attribute information of the role of the target work if the difference between the first number and the second number is greater than a preset difference threshold.

[0096] Optionally, the third determining module 204 further includes:

[0097] The fifth determination submodule is used to obtain the role attribute information of the target work character through a pre-trained text work role attribute discrimination model if the difference between the first number and the second number is not greater than the difference threshold; or to generate request information, wherein the request information is used to request manual determination of the role attribute information of the target work character.

[0098] Optionally, the first determining module 202 includes:

[0099] A slicing submodule, used for slicing the target text to obtain a plurality of text slices;

[0100] A sixth determination submodule is used to determine a target text slice containing the person name of the character in the target work;

[0101] The seventh determination submodule is used to determine the reference feature information between the person of the character in the target work contained in the target text slice and the personal pronoun in the target text slice.

[0102] Optionally, in the first determination module 202, the reference feature information between the person of the target work character and the personal pronouns is determined based on the feature vector corresponding to the person of the target work character and the feature vector corresponding to the personal pronouns, wherein the feature vector is used to characterize the semantics of the corresponding words and their positions in the target text.

[0103] Optionally, the apparatus 200 further includes:

[0104] The fourth determination module is used to sequentially use the person name of each identified work character as the person name of the target work character, so as to determine the role attribute information of each work character appearing in the target text through the first determination module 202, the second determination module 203 and the third determination module 204.

[0105] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0106] Reference below Figure 3, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0107] like Figure 3 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0108] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0109] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0110] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0111] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0113] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0114] Identifying target words in the target text, wherein the target words include the names and personal pronouns of characters in the work;

[0115] Determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters;

[0116] Determining, according to the reference feature information, a target personal pronoun that refers to the character of the target work;

[0117] According to the role attribute information corresponding to the target personal pronoun, the role attribute information of the role of the target work is determined.

[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first determination module may also be described as a "module for determining reference feature information".

[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0122] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] According to one or more embodiments of the present disclosure, Example 1 provides a method for determining a character attribute of a text work, including:

[0124] Identifying target words in the target text, wherein the target words include the names and personal pronouns of characters in the work;

[0125] Determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters;

[0126] Determining, according to the reference feature information, a target personal pronoun that refers to the character of the target work;

[0127] According to the role attribute information corresponding to the target personal pronoun, the role attribute information of the role of the target work is determined.

[0128] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining, according to the reference feature information, a target personal pronoun referring to the character of the target work includes:

[0129] Determining target reference feature information whose represented probability is greater than a preset probability threshold;

[0130] The personal pronoun corresponding to the target reference feature information is determined as the target personal pronoun.

[0131] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein determining the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun includes:

[0132] Determine a first number of target personal pronouns corresponding to the role attribute information being a first role attribute, and a second number of target personal pronouns corresponding to the role attribute information being a second role attribute;

[0133] If the difference between the first number and the second number is greater than a preset difference threshold, the role attribute information corresponding to the largest one of the first number and the second number is determined as the role attribute information of the target work character.

[0134] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein determining the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun further includes:

[0135] If the difference between the first number and the second number is not greater than the difference threshold, the role attribute information of the target work role is obtained through a pre-trained text work role attribute discrimination model; or, request information is generated, wherein the request information is used to request manual determination of the role attribute information of the target work role.

[0136] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein determining the reference feature information between the person and the personal pronoun of the character of the target work includes:

[0137] Slicing the target text to obtain multiple text slices;

[0138] Determine a target text slice containing the name of the character of the target work;

[0139] Determine the reference feature information between the person of the character of the target work contained in the target text slice and the personal pronoun in the target text slice.

[0140] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the reference feature information between the person of the character of the target work and the personal pronouns is determined based on the feature vector corresponding to the person of the character of the target work and the feature vector corresponding to the personal pronouns, wherein the feature vector is used to characterize the semantics of the corresponding words and their positions in the target text.

[0141] According to one or more embodiments of the present disclosure, Example 7 provides the method of any one of Examples 1 to 6, the method further comprising:

[0142] The person names of each identified work character are used in turn as the person names of the target work characters, so as to determine the role attribute information of each work character appearing in the target text.

[0143] According to one or more embodiments of the present disclosure, Example 8 provides a device for determining a character attribute of a text work, including:

[0144] A recognition module, used to recognize target words in the target text, wherein the target words include the names and personal pronouns of the characters in the work;

[0145] A first determination module is used to determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters;

[0146] A second determination module is used to determine a target personal pronoun referring to the character of the target work according to the reference feature information;

[0147] The third determination module is used to determine the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun.

[0148] According to one or more embodiments of the present disclosure, Example 9 provides the apparatus of Example 8, wherein the second determining module includes:

[0149] A first determination submodule is used to determine target reference feature information whose represented probability is greater than a preset probability threshold;

[0150] The second determination submodule is used to determine the personal pronoun corresponding to the target reference feature information as the target personal pronoun.

[0151] According to one or more embodiments of the present disclosure, Example 10 provides the apparatus of Example 8, wherein the third determining module includes:

[0152] A third determination submodule is used to determine a first number of target personal pronouns corresponding to the role attribute information being a first role attribute, and a second number of target personal pronouns corresponding to the role attribute information being a second role attribute;

[0153] The fourth determination submodule is used to determine the role attribute information corresponding to the largest one of the first number and the second number as the role attribute information of the role of the target work if the difference between the first number and the second number is greater than a preset difference threshold.

[0154] According to one or more embodiments of the present disclosure, Example 11 provides the apparatus of Example 10, wherein the third determination module further includes:

[0155] The fifth determination submodule is used to obtain the role attribute information of the target work character through a pre-trained text work role attribute discrimination model if the difference between the first number and the second number is not greater than the difference threshold; or to generate request information, wherein the request information is used to request manual determination of the role attribute information of the target work character.

[0156] According to one or more embodiments of the present disclosure, Example 12 provides the apparatus of Example 8, wherein the first determining module includes:

[0157] A slicing submodule, used for slicing the target text to obtain a plurality of text slices;

[0158] A sixth determination submodule is used to determine a target text slice containing the person name of the character in the target work;

[0159] The seventh determination submodule is used to determine the reference feature information between the person of the character in the target work contained in the target text slice and the personal pronoun in the target text slice.

[0160] According to one or more embodiments of the present disclosure, Example 13 provides the apparatus of Example 8, wherein in the first determination module, the reference feature information between the person of the character of the target work and the personal pronouns is determined based on the feature vector corresponding to the person of the character of the target work and the feature vector corresponding to the personal pronouns, wherein the feature vector is used to characterize the semantics of the corresponding words and their positions in the target text.

[0161] According to one or more embodiments of the present disclosure, Example 14 provides the device of any one of Examples 8 to 13, wherein the device for determining a character attribute of a text work further includes:

[0162] The fourth determination module is used to sequentially use the person name of each identified work character as the person name of the target work character, so as to determine the role attribute information of each work character appearing in the target text through the first determination module, the second determination module and the third determination module.

[0163] According to one or more embodiments of the present disclosure, Example 15 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1 to 7 when executed by a processing device.

[0164] According to one or more embodiments of the present disclosure, Example 16 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in any one of Examples 1 to 7.

[0165] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0166] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0167] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for determining the role attributes of a text work, characterized in that: include: Identifying target words in the target text, wherein the target words include the names and personal pronouns of characters in the work; Determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters; Determining, according to the reference feature information, a target personal pronoun that refers to the character of the target work; According to the role attribute information corresponding to the target personal pronoun, the role attribute information of the role of the target work is determined.

2. The method according to claim 1, characterized in that: Determining the target personal pronoun referring to the target work character according to the reference feature information includes: Determining target reference feature information whose represented probability is greater than a preset probability threshold; The personal pronoun corresponding to the target reference feature information is determined as the target personal pronoun.

3. The method according to claim 1, characterized in that The step of determining the role attribute information of the target work role according to the role attribute information corresponding to the target personal pronoun includes: Determine a first number of target personal pronouns corresponding to the role attribute information being a first role attribute, and a second number of target personal pronouns corresponding to the role attribute information being a second role attribute; If the difference between the first number and the second number is greater than a preset difference threshold, the role attribute information corresponding to the largest one of the first number and the second number is determined as the role attribute information of the target work character.

4. The method according to claim 3, characterized in that The step of determining the role attribute information of the target work role according to the role attribute information corresponding to the target personal pronoun further includes: If the difference between the first number and the second number is not greater than the difference threshold, the role attribute information of the target work role is obtained through a pre-trained text work role attribute discrimination model; or, request information is generated, wherein the request information is used to request manual determination of the role attribute information of the target work role.

5. The method according to claim 1, characterized in that The determining of the reference feature information between the person and the personal pronoun of the character in the target work includes: Slicing the target text to obtain multiple text slices; Determine a target text slice containing the name of the character of the target work; Determine the reference feature information between the person of the character of the target work contained in the target text slice and the personal pronoun in the target text slice.

6. The method according to claim 1, characterized in that The reference feature information between the person of the character in the target work and the personal pronoun is determined based on the feature vector corresponding to the person of the character in the target work and the feature vector corresponding to the personal pronoun, wherein the feature vector is used to characterize the semantics of the corresponding word and its position in the target text.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The person names of each identified work character are used in turn as the person names of the target work characters, so as to determine the role attribute information of each work character appearing in the target text.

8. A device for determining the character attributes of a text work, characterized in that: include: A recognition module, used to recognize target words in the target text, wherein the target words include the names and personal pronouns of the characters in the work; A first determination module is used to determine reference feature information between the name of a target work character and a personal pronoun, wherein the reference feature information is used to characterize the probability that the personal pronoun refers to the target work character, and the name of the target work character is the name of any work character among the identified names of the work characters; A second determination module is used to determine a target personal pronoun referring to the character of the target work according to the reference feature information; The third determination module is used to determine the role attribute information of the role of the target work according to the role attribute information corresponding to the target personal pronoun.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having at least one computer program stored thereon; At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.