# Novel Multirole-Oriented Deep Learning Text Classification Model

Authors: Ting Luo
Journal: Security and Communication Networks
 (2022)

---

## Abstract

In order to improve the analysis of multiple roles in novels, this article applies the deep learning text classification model to the analysis of novel roles. Moreover, in this article, the scale space formed by multiple text images of the same size is called an octave, and the text image size of adjacent groups is halved to construct a Gaussian pyramid. In text classification, this article uses the argument and amplitude information to form a direction gradient histogram and takes the argument corresponding to the largest peak as a main direction of the key point. Finally, this article constructs an intelligent analysis model. The research results show that the deep learning text classification model for multiple roles in novels proposed in this article has good effects on role analysis and text classification. For film and television scripts, the classification analysis of analysis texts and the contrast creation have very good application help.


---

## Body

## 1. Introduction

The analysis of the character’s personality in the novel helps us to understand the psychology of the character in the novel and the real life it reflects more accurately and deeply. At present, there are two main ideas for the character analysis of novel characters in academic circles. One is the qualitative study of literature and art. According to the researcher’s humanistic quality and the reading experience of the novel text, the personality of one or more characters in the novel is summarized into the main aspects from the microperspective. Then, the character characteristics of these aspects are corroborated by the relevant descriptions in the text [1], and the characteristics of the characters in the novels written by the same author are further summarized at the macro level [2]. The other is from the perspective of linguistics, by selecting several dialogues in the novel for pragmatic principles, turn-taking or other conversational analysis, or using a corpus to count the words used in the characters’ language, and get the words with higher frequency as keywords, and analyze the personality of the characters through the keywords [3]. At present, there are few studies that go deep into the initial character personality or personality traits (the first level) to discuss the role.Personality is a person’s stable attitude towards reality and habitual behavior, and it is a significant tendency of an individual’s behavior. From the perspective of psychometrics, compared with other mental states that are relatively easy to change, personality is a relatively stable personality trait, which has the advantages of being comparable, descriptive, and cross-contextual. Therefore, personality or personality traits can be regarded as the behavioral expression or mode of individual psychological activities. Psychological analysis of the characters in the novel from the perspective of personality can help to have a more accurate and profound understanding of the characters in the novel. Describing literary characters through their personalities can intuitively see their most prominent psychological characteristics and compare the psychological differences of different characters. The research field of personality traits includes a variety of theoretical models, among which the “big-fivepersonalitytrait model” (hereinafter referred to as “big-fivepersonality”) is the most valued by today’s academic circles.This paper applies deep learning text classification technology to the analysis of multiple roles in novels and builds an intelligent analysis model, which provides a theoretical reference for intelligent literature.The current research on artificial intelligence literary creation has the shortcomings of a single research angle and not deep theoretical foundation, so the research motivation of this paper is to improve the effect of artificial intelligence literature analysis.In order to improve the effect of multirole analysis in novels, this article applies the deep learning text classification model to the analysis of novel characters so as to realize the analysis effect of intelligent novel characters.The main research structure of this article is as follows: the introduction part analyzes the research status of multiple roles in novels and draws out the research content of this paper. The second part is the research algorithm of this article. The third part mainly studies the text classification model and proposes an improved algorithm as the basis for the model construction in this article. The fourth part combines the deep learning text classification method to construct a novel multirole analysis model. The reliability of the method in this article is verified by analysis. The conclusion part summarizes the research content of this article.


## 2. Related Work

Character modeling is a representation of characters that are automatically generated from the text of literary works. Dharmawan extracted the salient characteristics of characters from the text of the story, formed a description of the characters, and then generated a summary of the story [4]. Finck used topic models to learn character types from movie plot summaries, and each character type is represented from three aspects: agent, patient, and attribute according to the dependency relationship, and each aspect is represented. It is the distribution of a series of hidden topics, and each hidden topic is expressed as the distribution of words [5]. He used topic models to learn character types from novel texts. Each character type is based on four aspects: agent, patient, possessive, and predictive. Representation, each aspect is directly expressed as the distribution of words, and the factor of the novel author is added when generating words. Character profiling is an explicit way of modeling characters. It is an automatic classification problem to predict the attributes of characters, such as gender, age, and personality, from the text of literary works [6]. Hudson predicted whether the character of the novel is introverted or extroverted, using the SVM classifier, using the three characteristics of the character’s words, the character’s actions, the character’s adjective or adverbial description, and adding a variety of vocabulary resources, such as WordNet, VerbNet, LIWC, and word vector. The results show that using characters’ words as features are not as effective as the latter two. In terms of automatic classification of character relationships [7], Kamble divided the relationship between the characters in the novel into three categories: social, professional, and familial, and each relationship is further subdivided; according to the closeness of the relationship, it is divided into positive), neutral, and negative, and 109 English novels are marked with character relationships [8]. Drawing lessons from the idea of “the enemy of the enemy is a friend,” Lunyachek introduced structural features other than textual features when predicting the friendly or opposite relationship between characters based on the movie plot summary, that is, the relationship between the target character and other characters. This is useful for judging the relationship between target characters and modeling changes in character relationships. The length of the novel is longer. With the development of the plot, the relationship between the characters will often change. At this time, it is not necessary to explicitly define the relationship type, and the distribution of words can be used to express the relationship. The change of relationship is a sequence problem [9]. Maruthu proposed a character relationship model (relationship modeling network, RMN) based on recurrent neural network (RNN) and dictionary learning. The relationship type is represented by a vector, and the set of words most similar to the relationship type vector is used. To describe the relationship type [10]. Matulionyte used Hidden Markov Model with Gaussian emission to model changes in character relationships, taking into account various features such as dependent verbs, bag-of-words, and semantic frames [11]. McSherry extended RMN and, at the same time, modeled character changes and character relationship changes. The two changes were combined to express novels, calculate the similarity between novels, and then realize novel recommendations. For character network extraction and analysis [12], extract the characters and relationships in the novel, construct a network of characters, and discover or verify the characteristics of the characters in the novel and their social environment by studying the nature of the network. The nodes of the network are the characters, and the edges are the relationships between the characters. The definition of relationship can be a cooccurrence relationship between characters [13]; that is, the characters appear together in a certain scale of context, such as a sentence, a paragraph, or a chapter; it can also be an event relationship; that is, the characters participate in the same event. [14]. It can also be a dialogue relationship; that is, there is a dialogue interaction between two people [15]. Moreover, it can be some explicitly defined relationship, such as family relationship, and work relationship. The above research work is based on basic tasks such as word segmentation, named entity recognition, and interlocutor recognition in literary texts. At present, these tasks perform well in news texts, while in literary texts, they are faced with domain migration. The huge challenge of this has gradually attracted the attention of more researchers [16].To sum up, the current research on artificial intelligence literary creation has a single research angle and weak theoretical foundation. Therefore, based on the existing research results of the academic circle, I will clarify the research object from the source-artificial intelligence on the one hand. Connotation and development context, based on this basis, make a basis and targeted evaluation of the current situation of artificial intelligence literary creation and, on the other hand, strengthen theoretical interpretation, give play to the guiding value of professional theory, and analyze specific cases of machine creation. They rise to the height of theory, not only based on the present and linking with the reality, but also keep an eye on the future and keep up with the trend of the times.


## 3. Intelligent Text Classification Model

The feature extraction and description of text images is the most important part of the passive forensics algorithm of digital text image copy-paste tampering.Firstly, the text feature extraction algorithm is analyzed, and the pair analysis is carried out.SIFT can extract a feature with rotation and scale invariance, which is called SIFT feature, which has strong robustness to noise and brightness transformation. SIFT includes two steps: key point detection and key point feature description. Among them, key point detection includes scale space extreme value detection and key point positioning, and key point feature description includes direction assignment and key point description.First, the text image and the Gaussian kernel function are convolved to construct a scale space, which is represented byLx,y,σ, as shown in the following formula [17]:(1)Lx,y,σ=Gx,y,σ∗Ix,y.In the formula,∗ means convolution in x- and y-directions and Ix,y means text image. Gx,y,σ=1/2πσ2e−x2+y2/2σ2, which is a Gaussian kernel function with variable scale.The scale space formed by multiple text images of the same size is called an octave, and the text image size of adjacent groups is halved. As a result, a Gaussian pyramid is constructed. In each group of text images, two adjacent text images are subtracted, as shown in formula (2). In this way, the text image Dx,y,σ can be obtained to form a DoG (Difference of Gaussian), which is often referred to as a DoG pyramid. Then, the local extreme points are searched in the difference pyramid to determine candidate key points in the scale space and location space:(2)Dx,y,σ=Gx,y,kσ−Gx,y,σ∗Ix,y=Lx,y,kσ−Lx,y,σ.In the formula,k represents a constant.Since the candidate key points are selected from text images of different sizes, the coordinates need to be accurately fitted. If it is assumed that the candidate extreme pointx0=x0,y0,σ0T, this article uses this point as the origin to perform the second-order Taylor expansion of Dx,y,σ:(3)Dx=D+∂DT∂xx+12xT∂2D∂x2x.In the formula,x represents the offset relative to x0. In this article, formula (3) is used to obtain the derivative of the independent variable x and x^ is the location of the extreme point. If the value of x^ in any dimension exceeds 0.5, which means that the extreme point is closer to the neighboring point of point x0, so the neighboring point is used as the origin to revalue [18]. The algorithm repeats this process until the value of x^ in all dimensions does not exceed 0.5. Substituting the offset x^ into formula (3), the extreme value Dx^ of the extreme point in the difference pyramid is obtained [19]:(4)Dx^=D+12∂DT∂xx^.Dx^ is used as an index to measure the contrast of extreme points, and it is considered that the extreme points of Dx^<Tc are susceptible to noise and are directly discarded. Lowe recommends setting Tc=0.03 (assuming that the pixel value of the text image is between 0 and 1).SinceDx,y,σ responds very strongly to the edge, the extreme points on the edge are very susceptible to noise. The Gaussian difference function will produce a larger principal curvature at the edge, and the principal curvature can be calculated by the Hessian matrix shown in the following:(5)H=DxxDxyDxyDyy.The eigenvalues of the Hessian matrix are proportional to the principal curvature. In order to avoid calculating eigenvalues directly, formula (7) is used to measure the eigenvalues [20].(6)TrH2DetH=α+β2αβ=r+12r.In the formula,TrH is the trace of matrix H, DetH is the determinant of matrix DetH, α is the larger eigenvalue of H, and β is the smaller eigenvalue of matrix H, r=α/β. Finally, for each candidate key point, this article judges whether its matrix H satisfies formula (7):(7)TrH2DetH<Tr+12Tr.In the formula,Tr is the edge threshold, and the recommended value is 10. Eliminate the extreme points that do not satisfy formula (7), and the remaining points are the key points extracted according to SIFT.According to the local nature of the text image, the direction of each key point is assigned so that the feature descriptor has rotation invariance. For each text imageLx,y, this article uses the key point as the center and the radius 3×1.5σ of the circular area of the text image gradient to calculate the amplitude θx,y and amplitude mx,y [21]:(8)mx,y=Lx+1,y−Lx−1,y2+Lx,y+1−Lx,y−12,θx,y=tan−1Lx,y+1−Lx,y−1Lx+1,y−Lx−1,y.In this article, the directional gradient histogram is composed of the angle and magnitude information. The argument corresponding to the maximum peak value is taken as one main direction of the key point, and the argument corresponding to the remaining peak value 80% higher than the maximum peak value is taken as the remaining main direction of the key point. Therefore, the coordinate positions and scales of the key points generated by this area are exactly the same, but the main directions are different. At this point, the coordinates, scale, and direction of the text image can be assigned to each key point.Hu moment is a commonly used feature in the CMFD algorithm based on text image segmentation. This feature is called Hu moment, which is also often called invariant moment. Below, ordinary moments are introduced first.Thep+q-order moment of a density distribution function ρx,y is defined as shown in the following formula:(9)mpq=∫−∞∞∫−∞∞xpyqρx,ydxdy,p,q=0,1,2,…For the discrete text imagefx,y, the definition of the p+q-th order moment is rewritten as the following formula:(10)mpq=∑x=1M∑y=1Nxpyqfx,y.In the formula,M represents the number of pixels in the x-direction of the text image, and N represents the number of pixels in the y-direction of the text image. From formula (11), we can construct 0-order m00, 1st-order moments m01,m10, etc. The physical meaning of the 0th moment is the mass of the target area, and the 1st moment represents the center of mass of the target area. Constructed invariant moments are based on these ordinary moments. In order to obtain translation invariance, the central moment shown in formula (11) is constructed:(11)μpq=∑x=1M∑y=1Nx−x0py−y0qfx,y.In the formula,x0=m10/m00,y0=m01/m00. This represents the centroid position of the text image. In order to obtain scale invariance, the central moment is normalized according to the following formula:(12)ηpq=μpqμ00r,p+q=2,3,…,whereηpq is the normalized central moment of order v, r=p+q/2+1. Using the second- and third-order normalized central moments, seven kinds of Hu moments with translation, rotation, and scale invariance can be constructed, of which four low-order Hu moments are shown in the following:(13)Φ1=η20+η02,Φ2=η20−η022+4η112,Φ3=η20−3η122+3η21−η032,Φ4=η30+η122+η21+η032.In the formula,η20,η02, and η11 are the second-order normalized central moments, and η30,η03,η12 are the third-order normalized central moments.Next, the intelligent text feature analysis algorithm is synthesized, and the process of this algorithm is proposed.Through analysis, different algorithms are selected in each link. This article combines them according to a certain process and can realize the improved algorithm of passive forensics based on SIFT copy-paste tampering of text and images. The concrete realization procedure is shown in Figure1.Figure 1
SIFT-based text image copy-paste tampering passive forensics improved algorithm flowchart.It can be seen from Figure1 that the implementation process of the improved algorithm based on SIFT is as follows. First, the algorithm uses an improved feature extraction method to obtain a large number of SIFT features and improves the heavy-tailed distribution by squaring the features. Secondly, in order to improve the speed of nearest neighbor search, the algorithm uses a brute force search algorithm based on matrix operations to find the nearest neighbors of feature points. Third, in order to match as many similar key points as possible, the algorithm uses a three-step feature matching method to match similar features. Finally, in order to effectively filter out mismatches, the algorithm first uses cross-checking to initially filter and remove duplicate point pairs, then uses hierarchical clustering to filter out isolated points, and then uses the RANSAC-based affine transformation matrix estimation method to filter out the excluded points.The steps of the brute force search algorithm based on matrix operations are as follows:(1)
This algorithm constructs matricesF and C. F is an n×128-dimensional matrix. Each row represents the feature of a key point. There are n key points in total, and C=F. Therefore, calculating the distance between the features is transformed into calculating the Euclidean distance between each row of matrix F and each row of matrix C. The symbol dist represents the Euclidean distance between the rows of matrix F and matrix C, where the element disti,j in the matrix dist represents the Euclidean distance between the i row Fi of the matrix F and the j row Cj of the matrix C. The calculation formula of dist is shown in the following formula:(14)dist=A+B−2D.In the formula,(15)A=F12F12⋯F12F22F22⋯F22⋮⋮⋱⋮Fn2Fn2⋯Fn2,B=C12C22⋯Cn2C12C22⋯Cn2⋮⋮⋱⋮C12C22⋯Cn2,D=FCT;.(2)
After the algorithm obtains the distance matrix dist, it is noticed that the diagonal elements are all 0, which indicates the distance between a feature and itself. In order to facilitate subsequent calculations, the diagonal element value is set to −1.(3)
The algorithm uses the quick sort method to sort the distances in ascending order and records the index corresponding to each distance. In the sorting result, the point with the smallest distance fromxi is xi itself, which is removed.Through the above steps, the nearest neighbors of each key point in the feature space can be obtained.Taking the key pointxi as an example, the steps of the three-step feature matching method are explained as follows:(1)
The algorithm improves the g2NN criterion. Through the brute force search algorithm based on matrix operation, the matching degree vectorD=d1,d2,…,dn−1 of xi is obtained, and the ratio vector r=d1/d2,d2/d3,…,dn−1/dn is calculated. Then, the algorithm finds the last element dk/dk+1 in the vector r that is less than the threshold T and thinks that the point Pk and all the key points P1,P2,…,Pk−1 before it may be the key points that match the xi point.(2)
Considering that in the text image, the key point features of adjacent positions may be very similar. Therefore, the distance between pointxi and point P1,P2,…,Pk in the text image is required to be greater than Vs, and Vs is the movement vector threshold.(3)
In order to prevent the occurrence of a large distance between features and a sudden change in the ratio, the absolute thresholdTabs is used to filter the matching points. In order to automatically select the appropriate Tabs, referring to the two-stage feature matching method proposed by Jin Guonian, the average distance between the matching features that meet the 2NN detection is used as the threshold Tabs. In particular, when choosing the matching features detected by Laughter 2NN, a simple mismatch filtering was performed using cross-checking.Through these three steps, the matching points of pointxi can be screened out. For the remaining key points, the same steps can be used to find the matching point of each key point.The basic principle of the cross-checking algorithm is as follows: if pointxi exists in the matching point of point xj, then point xj should also exist in the matching point of point xi. For each key point, a check is carried out, and preliminary filtering can be carried out quickly.Condensed hierarchical clustering first divides each point into a cluster individually, then continuously merges the closest clusters, and finally merges into a cluster. The hierarchical structure of the entire cluster is similar to an inverted tree.There are many ways to calculate the distance between clusters. Experiments have found that in CMFD, using the Ward method to calculate the distance is the best. At this time, the clustering algorithm is also called the Ward-linkage algorithm. The distance calculation formula of the Ward method is shown in the following formula:(16)du,v=v+sTdv,s2+v+tTdv,t2−vTds,t2.In the formula:u, v, s, t are all clusters, and u is a new cluster formed by the fusion of s and t, T=v+s+t, and the symbol • represents the number of elements in the set “•.”When the key points are clustered according to the spatial distance, the “pruning” operation at the height can formm clusters, which are represented by the set c1,c2,…,cm. ci is selected from the set in the order of i=1,2,…,m−1, and for each ci, a pairing attempt is made with cj, where j=i+1,i+2,…,m.The pairing principle is as follows: if there is a matching point of the point incj in ci, then ci and cj are paired successfully, and the matching point pair in ci and cj can form a cluster pair Ck. Among them, Ck=xk1,yk1,xk1′,yk1′,xk2,yk2,xk2′,yk2′,…xkn,ykn,xkn′,ykn′,xki,yki,xki′,yki′, which represents a pair of matching points, and i=1,2,…n. This algorithm counts the cluster pairs generated according to the set c1,c2,…,cm to form the cluster pair set C1,C2,…,Cs. For any cluster pair Ck in the set, cardCk≥3 is required, where the symbol card• refers to the number of elements in the set •, and the number of elements greater than 3 takes into account the requirements of affine homography matrix estimation. The algorithm renumbers the cluster pairs that meet the requirements of the number of elements to form a set C1,C2,…,Cl. The set can be divided into 2l clusters, which can be regarded as 2l different regions.According to the generalized text image copy-paste tampering model, the text image copy-paste transformation method can finally be summarized as an affine transformation. The affine transformation form is given in the formula, which is rewritten as a matrix form, as shown in the following formula:(17)x′y′1=m11m12Δxm21m22Δy001xy1⟶X′=HX.In the formula,m11,m12,m21,m22 represent linear transformation parameters, Δx,Δy represent translation parameters, x and y represent the key point coordinates of the copy, and x′ and y′ represent the coordinates of the key point of the paste. H represents the affine transformation matrix, which is also called affine homography.Generally, to solveH, at least three sets of matching point pairs are required, and three sets of matching point pairs are taken out of cluster pairs Ck,k=1,2L,l. Assuming that under ideal conditions, these point pairs use the same transformation matrix, and the three points in a cluster are not collinear, the affine homography matrix can be calculated by H=X′XTXXT−1. In the text image, the coordinates are discrete, and there will be problems such as mismatched point pairs and point collinearity. Therefore, it is necessary to use the least-squares method to estimate matrix H and combine the RANSAC algorithm to divide the matching point pairs into inliers and the mismatched point pairs into outliers, and through repeated iterations, the real H is constantly approached.(18)LH=∑i=1knXi′−HXi2.For cluster pairCk,k=1, we set the current optimal affine homography matrix as Hb=None, and the number of interior points of Ck under matrix Hb is Mb=0. The steps of the RANSAC-based affine transformation matrix estimation algorithm are as follows:(1)
The algorithm randomly selects three samples fromCk=xk1,yk1,xk1′,yk1′,xk2,yk2,xk2′,yk2′,…xkn,ykn,xkn′,ykn′ to form x1,y1,x1′,y1′,x2,y2,x2′,y2′,…xm,ym,xm′,ym′ and checks whether the data are valid. If the data are invalid (less than three linearly independent points), the algorithm jumps out of this iteration. Otherwise, the algorithm uses the least-squares method to calculate the affine homography matrix H.(2)
This algorithm constructsXi=xi,xj,j=1,2,L. kn is substituted X˜i′ into formula (18) to obtain X˜i′. According to formula (19), the inner and outer points are divided. The point pairs satisfying the formula (19) are divided into inner point pairs Xi=xi,xj,j=1,2,L, and the remaining points of M are divided into outer point pairs.(19)X˜i′−Xi′2≤ε.In the formula,Xi′ represents the point xi′,xj′,1T that matches Xi, and ε represents the residual threshold.(3)
IfM>Mb, the current homography matrix H is the optimal solution; that is, Hb=H. If M=Mb, compare the cost functions of H and Hb calculated by formula (19), and the homography matrix with the smallest cost function is Hb.After the above steps are iteratedN times, Hb is stored in the set ℚ, and the subset C¯k composed of the interior point pairs determined by Hb in the cluster pair Ck is stored in the set ℂ. Then, the algorithm continues to repeat the above iterative steps for cluster pair Ck+1 until k=s, ℚ=H1,H2,…,Hs, and ℂ=C¯1,C¯2,…C¯s are obtained. The symbol Tm is used to represent the threshold logarithm of the interior points in the cluster pair. If cardC¯k≥Tm, then C¯k is considered to be a set of matching point pairs; otherwise, C¯k is discarded. The set of interior point cluster pairs filtered by the threshold C¯k is denoted as ℂ′, and the set of corresponding homography matrix is denoted as ℚ′.Generally, after filtering, there are still a certain number of similar matching point pairs in the text image, and the text image is considered to be a tampered text image. For the algorithm in this article, ifcardℂ′>0, it means that there are still matching point pairs in the text image after filtering. It means that the text image has been copy-paste-tampered; otherwise, the text image is considered real.


## 4. Novel Multiple Roles Analysis Model Based on Deep Learning Text Classification

This article combines the deep learning text classification method to construct a novel multiple roles analysis model and verifies the reliability of this method by analyzing the novel multicharacter. The specific ideas of deep learning are shown in Figure2:Figure 2
The specific ideas of deep learning.In natural language processing, the preprocessing of corpus data is also crucial. Automatically extracting language information from the text can overcome the difficulty of acquiring language knowledge. The preprocessing of literary works includes basic tasks such as word segmentation, part-of-speech tagging, named entity recognition, syntactic analysis, name clustering, and reference resolution. The preprocessing process of the novel is shown in Figure3.Figure 3
The preprocessing process of the novel text.This article uses the context based on the dependency relationship as the feature word to train the vector of the novel character. The process is shown in Figure4.Figure 4
The process of training the character vector.In the data preprocessing, the results of the syntactic analysis of all texts are counted. It is found that the characteristic words that have a syntactic relationship with the characters in the novel are mainly composed of five types of sentence components, namely, poss (all forms), dobj (direct object), nsubj (noun subject), amod (adjective), and nsubjpass (passive noun subject). Using the parts of speech of these five types of characteristic words, we divide them into four groups and then merge these five types of characteristic words into a whole, resulting in a combined form of five groups of characteristic words. The first group uses the overall combination of five types of feature words to represent the characters in the novel, which is the character vector representation method proposed in this article, and the character vector is denoted as c_pdnan_vec. The second group is to use the words nsubj and nsubjpass to represent the characters in the novel, and the character vector is denoted as c_nn_vec. The third group is to use only words containing dobj to represent the characters in the novel, and the character vector is denoted as c_d_vec. The fourth group is to use only words containing poss to represent the characters in the novel, and the character vector is denoted as c_p_vec. The fifth group is to use only words containing amod to represent the characters in the novel, and the character vector is denoted as c_a_vec. The specific representation method of these five groups of person vectors is shown in Figure5.Figure 5
Schematic diagram of training character vectors of different sentence components.The fast and accurate classification model of long text based on FastText is shown in Figure6. In the input part of the statistics module, in addition to the prediction result of the sentence block, the weight W of the sentence block needs to be added. Among them, the definition of w is W = {wi|1 ≤ i ≤ len (blocks)}, and Wi is the weight of the sentence block whose sequence number is i. After that, in the statistics module, the scores of each category are counted according to the weight, and the score Scoreci of each category and the total score of all categories Scoretotal are obtained. After that, according to the size of Scoreci, the proportion P of the Scoretotal occupied by the category C and Scorec with the highest score and the number index of the key sentence block predicted to be category C are obtained. Finally, the model outputs C, P, and index. The specific algorithm flowchart of the fast and accurate classification model of long text based on FastText is shown in Figure 7.Figure 6
Algorithm flowchart of the fast and accurate classification model.Figure 7
Algorithm flowchart of the fast and accurate classification model.After constructing the above model, the model is verified, the model is verified in real time, and a large number of novels are obtained through the network, and the model in this article is used for text classification. On the basis of text classification, this article analyzes the multiple roles of novels and builds the model of this article through a simulation platform. The statistical text classification results are shown in Table1 and Figure 8.Table 1
The classification effect of the novel text classification model based on deep learning.
NumberText categorizationNumberText categorization189.841984.97289.622091.60385.892191.35487.582291.30584.472385.49691.152485.90786.582586.95886.262684.51990.922784.001084.922891.831187.202988.071291.733084.231384.513186.931485.333287.031585.603387.651685.913486.341786.103585.281888.523691.62Figure 8
Data statistics of the novel text classification experiment.It can be seen from the above research that the effect of the novel text classification method based on deep learning proposed in this article is very good, and then the statistics of the effect of the text classification model based on deep learning in the multirole analysis of novels are carried out, as shown in Table2 and Figure 9.Table 2
Statistical table of the effect of novel multirole analysis based on deep learning text classification model.
NumberRole analysisNumberText categorization184.161971.95274.332077.35374.672176.33476.902273.97576.912372.97677.202474.86771.102582.19880.652680.66978.362784.031080.052879.451185.162973.121281.583079.741379.183184.191478.483278.451573.753379.811684.583472.441785.723582.301880.683683.64Figure 9
Experimental data of novel multirole analysis based on deep learning text classification model.The intelligent text analysis model proposed in this article is compared with the method proposed in the literature [8], and the effect of intelligent text analysis is calculated. The statistical results are shown in Table 3.Table 3
Comparison of the effects of intelligent text feature analysis models.
NumberThe method of this articleThe method of [8]NumberThe method of this articleThe method of [8]NumberThe method of this articleThe method of [8]185.3175.061980.3076.013782.3477.00282.8969.232077.4672.123872.6168.39383.4971.462172.8071.033971.4076.62480.3370.622278.8569.654083.0566.02578.6173.322374.4663.864178.3865.69681.2065.012484.0472.094284.7062.47776.6866.042579.9565.104384.3365.25871.1372.122679.8862.234481.2076.37980.4176.712785.1766.794580.6072.331079.7364.122877.4565.104676.1669.031179.5665.112975.0167.414784.0574.191280.4776.683081.8463.214885.2762.041383.0173.463174.7668.954972.0164.391481.1675.463273.8774.495081.6568.241583.3763.013385.3170.745181.5465.211682.6972.443480.4867.035281.9163.361774.4375.163575.7371.995377.3762.331882.6066.553678.8171.415484.5266.50Through the above research, it can be seen that the deep learning text classification model for multiple roles in novels proposed in this article has good effects on role analysis and text classification and meets the needs of intelligent analysis of novels.


## 5. Conclusion

The research of systemic functional linguistics adopts a quantitative method to analyze the personality of characters in a certain vocabulary grammar framework, word analysis theory, or relatively stable vocabulary. Qualitative analysis of characters in novels is the mainstream of current psychological analysis of characters in novels, and the psychological analysis of characters in novels generally depends on the subjective experience and literary quality of researchers in the research process. At present, deep learning technology has been widely used in many tasks of natural language processing, but the application of text in the field of literature is still less. This article studies the basic problem of fictional character modeling, which is a basic problem of computational literature, and starts with the basic distributed representation method to explore the application of deep learning methods in texts in the field of literature. This article applies deep learning text classification technology to analyze multiple roles in novels and builds an intelligent analysis model, which provides a theoretical reference for intelligent literature.



---

*Source: 8942841-2022-03-27.xml*