A Method for Representing and Calculating Latin Zhuang Language Vectors

Through deep learning technology, the Latin Zhuang corpus is trained and learned, and the low-dimensional dense semantic vector representation is obtained, which solves the inconvenience of digitization research and promotion of Latin Zhuang, and realizes the automated processing and intelligent information processing of Latin Zhuang.

CN114091453BActive Publication Date: 2025-07-25GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111427305.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-07-25
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

Due to the limitations of the use of modern Latin Zhuang, most users can only speak Zhuang language, understand Zhuang language semantics but cannot write Latin Zhuang language, which leads to inconvenience in digital research and large-scale promotion of Latin Zhuang language.

Method used

Deep learning text processing technology is used to train and learn the labeled Latin Zhuang corpus, obtain the low-dimensional dense semantic vector representation of Latin Zhuang, and calculate the Latin Zhuang semantics in different contexts through the Latin Zhuang preprocessing module, language modeling module, vector representation normalization module and vector representation and calculation module.

Benefits of technology

It realizes the automated processing and intelligent information processing of Latin Zhuang language, solves the vector representation and calculation problems of Latin Zhuang language, and supports the large-scale promotion and independent learning of Latin Zhuang language.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091453B_ABST
    Figure CN114091453B_ABST
Patent Text Reader

Abstract

The present invention provides a method for Latin Zhuang language vector representation and calculation, including a representation and calculation model composed of a Latin Zhuang language preprocessing module, a Latin Zhuang language language modeling module, a Latin Zhuang language vector representation normalization module, and a Latin Zhuang language vector representation and calculation module connected in sequence. After a text written in Latin Zhuang language is processed by this representation and calculation model, the vector representation of the Latin Zhuang language text can finally be obtained. The method of the present invention solves the problems of vector representation and calculation of Latin Zhuang language and can be used for the automated processing and application of Latin Zhuang language.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to natural language processing technology and Latin Zhuang word vector generation technology, which is a Latin Zhuang vector representation and calculation method. The vector representation method of the present invention is only suitable for Latin Zhuang. Background Art

[0002] Modern Zhuang language is composed of Latin letters as basic morpheme units. Compared with the traditional square Zhuang language form, Latin letters are easier to process by computer. Due to the limitations of the use of modern Latin Zhuang language, most users can only speak Zhuang language and understand Zhuang language semantics, but cannot write Latin Zhuang language, which brings many inconveniences to the digital research and large-scale promotion of Latin Zhuang language. The present invention proposes a Latin Zhuang language vector representation and calculation method, which trains and learns the labeled Latin Zhuang language corpus by using deep learning text processing technology, obtains the low-dimensional dense semantic vector representation of Latin Zhuang language, and can use the obtained Latin Zhuang language word vector representation to calculate the Latin Zhuang language semantics in different contexts. The Latin Zhuang language vector representation method can be widely used in Latin Zhuang language intelligent information processing, Latin Zhuang language large-scale promotion and Latin Zhuang language autonomous learning. Summary of the invention

[0003] The overall processing flow of the Latin Zhuang language vector representation and calculation method of the present invention is as follows: Figure 1 As shown, it includes a Latin Zhuang preprocessing module, a Latin Zhuang language modeling module, a Latin Zhuang vector representation normalization module, and a Latin Zhuang vector representation and calculation module which are sequentially connected.

[0004] The processing flow of the Latin Zhuang preprocessing module is:

[0005] First, input the Latin Zhuang text corpus, convert the letters of the input Latin Zhuang text corpus into lowercase letters, and divide the Zhuang text corpus into sentences according to punctuation marks to obtain a sentence text sequence consisting of several sentences;

[0006] Second, the sentence text sequence output in the first step is segmented according to the Latin Zhuang space, and the sentence sequence is divided into a word sequence consisting of independent Latin words;

[0007] Third, output the sequence numbers of the word sequences after word segmentation in the corpus.

[0008] The processing flow of the Latin Zhuang language modeling module is:

[0009] First, the number of window words is set, the number of co-occurrences of any two Latin Zhuang words in the window is calculated, and the window word co-occurrence matrix is constructed according to the number of co-occurrences of any two words in the window;

[0010] Second, set the dimension of the output Latin Zhuang language vector and initialize the weight matrix of the Latin Zhuang language vector;

[0011] Third, input the window word co-occurrence matrix into a three-layer neural network. Through the linear hidden layer of the neural network, perform a weighted summation calculation with the weight matrix of the Latin Zhuang language, and classify and output the result of the summation calculation through the non-linear softmax function.

[0012] The processing flow of the Latin Zhuang language vector representation in it is as follows:

[0013] First, compare the classification output result of the language modeling module with the existing supervised data, and use the cross-entropy loss to update the parameters of the weight matrix;

[0014] Second, set a threshold to make the neural network training process converge, obtain the weight vector of the hidden layer at this moment, and obtain the vector representation matrix of the Latin Zhuang language through weighted calculation;

[0015] Third, divide each element in the column vector of the Latin Zhuang language representation matrix by the length of the column vector to obtain the normalized representation of the column vector of the Latin Zhuang language vector matrix.

[0016] The processing flow of the Latin Zhuang language vector representation and calculation module in it is as follows:

[0017] First, obtain the vector of any Latin Zhuang language word using the normalized vector representation of the Latin Zhuang language;

[0018] Second, calculate the semantic similarity between any two Latin Zhuang language words using the cosine similarity calculation formula, and the value of the similarity represents the semantic similarity between the two words;

[0019] Third, calculate the cosine similarity between any two sentences, and the value of the similarity represents the semantic similarity between the two sentences.

[0020] The definition of the present invention is as follows:

[0021] 1. Latin Zhuang language clause structure

[0022] The Latin Zhuang language clause in the present invention performs sentence segmentation on the input Latin Zhuang language paragraph, and its segmentation format is as follows:

[0023] Latin Zhuang language sentence 1 / sentence segmentation mark 1

[0024] Latin Zhuang language sentence 2 / sentence segmentation mark 2

[0025] ……

[0026] Latin Zhuang language sentence n / sentence segmentation mark n

[0027] 2. Latin Zhuang language word segmentation structure

[0028] The Latin Zhuang language word segmentation in the present invention performs word segmentation on the Latin Zhuang language sentences after clause division, and its segmentation format is as follows:

[0029] Latin Zhuang language 1 / word segmentation mark 1

[0030] Latin Zhuang language 2 / word segmentation mark 2

[0031] ……

[0032] Latin Zhuang language n / word segmentation mark n

[0033] 3. Calculation formula for the number of times two Latin Zhuang language words co-occur in a window

[0034] In order to obtain the semantic relevance between two Latin Zhuang language words, the number of times any two Latin Zhuang language words co-occur in the corpus is used for calculation. When the number of window words is 5, the calculation formula is as follows:

[0035]

[0036] 4. Calculation formula for the co-occurrence matrix in a window

[0037] When the number of window words is 5, the calculation formula for the co-occurrence matrix between word i and its two adjacent words before and after is as follows:

[0038]

[0039] In formula (2) represents the number of times word i co-occurs with its next word i + 1.

[0040] 5. Calculation formula for word vector normalization

[0041] The normalization of the Latin Zhuang language word vector adopts column vector normalization, and the calculation formula is as follows:

[0042]

[0043] In formula (3), [w1, w2,..., w i ..., w n is the word vector representation of word w.

[0044] 6. Calculation formula for the semantic similarity of any two Latin Zhuang language word vectors

[0045] The calculation formula for the semantic similarity of the word vectors between Latin Zhuang language word i and word j is as follows:

[0046]

[0047] Specific processing steps of the present invention:

[0048] As Figure 2 shown, the processing flow of the Latin Zhuang language preprocessing module is as follows:

[0049] Start at P201;

[0050] Read in the Latin Zhuang language corpus at P202;

[0051] Perform lowercase processing on the Latin Zhuang language corpus at P203;

[0052] Perform sentence splitting on the Latin language corpus to generate a sentence sequence at P204;

[0053] Perform word segmentation on the sentence sequence after sentence splitting according to spaces at P205;

[0054] Output the list of Latin words after word segmentation at P206;

[0055] End at P207.

[0056] As Figure 3 shown, the processing flow of the Latin Zhuang language language modeling module is as follows:

[0057] Start at P301;

[0058] Set the number of window words N = 5 at P302;

[0059] Use formula (1) to statistically calculate the co-occurrence times of the word i in the middle of the window with its two adjacent words at P303;

[0060] Use formula (2) to construct a co-occurrence matrix from the co-occurrence times in P303 at P304;

[0061] Set the output dimension of Latin Zhuang language D = 100 at P305;

[0062] Initialize the weight matrix T at P306;

[0063] Input the co-occurrence matrix into a three-layer neural network at P307;

[0064] Obtain the output vector H of the hidden layer of the neural network at P308;

[0065] Calculate the Latin Zhuang language vector representation W = T × H at P309;

[0066] Output the Latin Zhuang language word vector representation using the softmax function at P310;

[0067] P311 updates the weight T using stochastic gradient descent. If the threshold is not reached, execute P306. If the threshold is reached, execute P312;

[0068] P312 ends.

[0069] As Figure 4 shown, the processing flow of the normalized module for the Zhuang language vector representation in Latin is as follows:

[0070] P401 starts;

[0071] P402 compares the output result of the language model with the supervised data;

[0072] P403 updates the parameters using the cross-entropy loss function;

[0073] P404 uses the backpropagation algorithm to converge the neural network;

[0074] P405 calculates the normalization of the Zhuang language word vector in Latin using formula (3);

[0075] P406 outputs the normalized representation of the Zhuang language word vector in Latin;

[0076] P407 ends.

[0077] As Figure 5 shown, the processing flow of the module for the Zhuang language vector representation and calculation in Latin is as follows:

[0078] P501 starts;

[0079] P502 obtains the word vector of any Zhuang language word in Latin using the normalized output of the Zhuang language word vector;

[0080] P503 calculates the cosine similarity between any two Zhuang language words in Latin using formula (4);

[0081] The value range of the cosine similarity is [0, 1]. The larger the value, the closer the semantics of the two words;

[0082] P505 calculates the normalized word vector of each Zhuang language word in Latin for any input sentence;

[0083] P506 concatenates each Zhuang language word vector to obtain a sentence vector;

[0084] P507 sets the length of the sentence. For sentences with insufficient length, zero vectors are used to pad;

[0085] P508 calculates the cosine similarity between any two sentences;

[0086] P509 ends.

[0087] The method of the present invention solves the vector representation and calculation problems of Latin Zhuang language, and can be used for automatic processing and application of Latin Zhuang language. After a text written in Latin Zhuang language is processed by the representation and calculation model, the vector representation of the Latin Zhuang language text can be finally obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 It is the overall processing flow chart of the method of the present invention;

[0089] Figure 2 It is a processing flow chart of the Latin Zhuang language preprocessing module of the method of the present invention;

[0090] Figure 3 It is a processing flow chart of the Latin Zhuang language modeling module of the method of the present invention;

[0091] Figure 4 It is a processing flow chart of a Latin Zhuang language vector representation normalization module of the method of the present invention;

[0092] Figure 5 The present invention is a Latin Zhuang language vector representation and calculation module processing flow chart of the method of the present invention. DETAILED DESCRIPTION

[0093] The specific implementation of the Latin Zhuang language vector representation and calculation method of the present invention is divided into the following five steps.

[0094] Step 1: Execute the Latin Zhuang preprocessing module

[0095] The Latin Zhuang text input in the embodiment of the present invention is taken from the standard Latin Zhuang text corpus in "March 3" (Zhuang version), and the Latin Zhuang text is as follows:

[0096] The Latin Zhuang text to be executed is as follows:

[0097] The big guy has a lot of money and doesn't know how to spend it. He just keeps it there. When the Party cadres come to the village, they should educate him. The villagers should also learn to be frugal and not waste. Now, there are some people who like to show off their wealth. They buy luxury goods and compare with others. These days, some people have a lot of money but don't know how to use it properly. They buy expensive cars and houses just to show off, but they don't really need them. They should learn to be more frugal. The Party cadres should use the example of "practicing thrift" to educate the masses. They should also encourage the masses to save resources and reduce waste. The big guy doesn't understand this. He just builds a big house to show off. He doesn't have a sense of thrift. He spends a lot of money on unnecessary things and doesn't know how to manage his finances...... The big guy doesn't know how to save money and is always in debt.Youq gwnz congz ninzle mck bi lai,seizneixngamg rim cactcihbi.Mwh ngamg haenzhingh,daxbohnvinhnacuz mboui yungh geijnanz lii daugndaej hwnq liux,ngoenznaengacaenh gwn yw mbuj dingx,hacb,beuihach faenz gag roengzcongz daeuj byaj,miz gejj haez cungj ngaiz laemxdwkgyacuj ok lwed lo li mbhouj fug.

[0098] (1) After the lowercase processing of the Latin Zhuang text to be executed, the generated results are as follows:

[0099] The big country's workers are all very hardworking. They work very hard every day. When the country's cadres come to the countryside to visit the people, they should show concern for the people's living conditions. They should not just go through the motions. They should really do something practical. These days, the country's cadres should really go deep into the grassroots, understand the real situation of the masses, and solve the problems that the masses are most concerned about. They should not just talk the talk. They should really roll up their sleeves and do the work. They should not just make empty promises. They should really take practical actions...... The big country's workers should not just sit back and do nothing. They should really take on the responsibility and work hard......After you segment the Latin Zhuang text to be executed, the generated results are as follows: When encountering a word boundary, if there is no appropriate word at the word boundary, the character at the word boundary is combined with the previous character to form a new word. If it still does not meet the requirements, the character at the word boundary is combined with the next character to form a new word, and so on until it meets the requirements or reaches the end of the text.

[0100] (2) After segmenting the Latin Zhuang text to be executed, the generated results are as follows:

[0101] ['De', 'daj', 'gwnz', 'congz', 'umj', 'daxhohroengz', 'acn', 'eijninz','ma,', 'daxhoh', 'lij', 'yswj', 'hauqeej', 'dwk.', 'Doengh', 'boux', 'dang', 'gvaqganbu', 'haenx','mboui', 'Iwnh', 'hung', 'iq.ngoenznaengz', 'yawj', 'baugeeij', 'caenh', 'lumj', 'gwnhacuxdonq', 'ityiengh', 'noix','mbouj', 'ndacj', 'law.', 'Dai', 'duiyouh','ma', 'daengx','mhanjranz', 'youqIc.', 'dastboh', 'binacngz', 'cungi', 'yack', 'dingh', 'geijfacnh', 'haugeej.', 'Geij', 'ngoenz', 'ncix,', 'gwnzhaugeejj', 'daengh','miz', 'giji', 'gojgaeq', 'goengganbu', 'geg', 'ndeu,', 'daxboh', 'yawi', 'hac', 'vawidauq', 'yawj','sat', 'le', 'vanzlij', 'ag', 'damz', 'gagmboen.', 'Yawj', 'gj', 'yiengh', 'daxboh','sig', 'roxboux', 'ganbu', 'geq', 'neix.', 'Gwnz', 'bauqceijigangj', 'ngeihcib', 'bi', 'paxgong', 'boux', 'ganbu', 'geqncix', 'roenghaij', 'guh','seng', 'eiq', 'fatcaiz', 'lo', 'cib', 'lai', 'bi', 'dacuj', 'hangcoengh', 'le', 'geij', 'hakbous', 'lwgnyez', 'ndaw', 'ranz', 'gungzhoj', 'haenxhac', 'doeg', 'dayoz.', 'Daxhoh', 'nbouj', 'dan', 'gagyawj.lij', 'dawz','mbaw', 'haugcej', 'ndeng', 'hawjde', 'yawj', 'dem.']','De','mbouj','miz','sim','hac','yawjhauqeejj','law.','Gag','damz','nacuz,','goengganbu','goq ','neit','dwg','boux','cacncik','gouhaenz','lo,','laeng','de','ciq','sack','geij','cib','fanhe ','ma','ciengx','sack','geij','bak','duz','mou,','mbouj','fratcaiz','gou','mbouj','sachg','lo. .....Daxhoh','duiyouh','mbouj','daengz','haj','hicouh','bacnzhingh','lo.','Youq','gwnz','congz' ,'ninzle','mck','bi','lai,','seizneix','ngamg','rim','cactcihbi.','Mwh','ngamg','haenzhingh,', 'daxbohnvinhnacuz', 'mboui', 'yungh', 'geij', 'nanz', 'lii', 'daugndaej', 'hwnq', 'liux,', 'ngoenznaenga caenh','gwn','yw','mbuj','dingx,','hacb,','beuihach','faenz','gag','roengzcongz','daeuj','byaj ,miz','gejj','haez','cungj','ngaiz','laemx','dwkgyacuj','ok','lwed','lo','li','mbhouj','fug.'].

[0102] (3) As soon as the lightning strikes, the lightning strikes:

[0103] "de daj gwnz congz umj daxhohroengz acn eijninz ma daxhoh lij yswjhauqeej dwk."\

[0104] "Those who have not experienced the hard work of the predecessors will not understand the difficulties of this task."

[0105] "When you come to this position, you will understand the responsibilities and pressures of this job."

[0106] "Those who are in this position must all be able to withstand the test of temptation."

[0107] "We must resolutely safeguard the interests of the masses and not allow any harm to the masses."

[0108] "We must severely punish those who violate the interests of the masses and use them as a warning to others."

[0109] "This kind of behavior will seriously damage the image of the Party and the prestige of the Party among the people."

[0110] "We must not allow such people to continue to do evil and harm the people, and we must not let them go unpunished."

[0111] "If the cadres don't lead the masses to get rich, who else will?"

[0112] "If you don't support me, you won't be able to reach the peak of happiness."

[0113] "In today's world, time is money, efficiency is life."

[0114] "The development of the motherland requires the joint efforts of our generation. We must not slack off, comrades."

[0115] "To achieve the goal of building a prosperous and strong country, we must have the determination and courage to overcome all difficulties."

[0116] Second step: Execute the "Latin Zhuang Language Modeling Module"

[0117] (1) Based on the first step, perform language modeling on the preprocessed Latin Zhuang text to generate a 100-dimensional vector representation. The word vector representation results of some Latin words are as follows:

[0118] daj: [-1.9429377e-03 -5.2673803e-03 9.4466219e-03 -9.2987278e-03 4.5034122e-03 5.4037259e-03 -1.4091855e-03 9.0070432e-03 9.8842960e-03 -5.4755528e-03 -6.0206768e-03 -6.7464048e-03 -7.8960136e-03 -3.0472232e-03 -5.5941506e-03 -8.3449073e-03 7.8399474e-04 2.9954035e-03 6.4150081e-03 -2.6310978e-03 -4.4535347e-03 1.2488194e-03 3.9289211e-04 8.1169661e-03 1.8287936e-04 7.2317342e-03 -8.2658483e-03 8.4328614e-03 -1.8886093e-03 8.7015498e-03 -7.6158433e-03 1.7973603e-03 1.0568970e-03 4.5918412e-05 -5.1037571e-03 -9.2478562e-03 -7.2657038e-03 -7.9516331e-03 1.9128636e-03 4.7664248e-04 -1.8128089e-03 7.1188631e-03 -2.4745842e-03 -1.3474370e-03 -8.9006657e-03 -9.9249473e-03 8.9488141e-03 -5.7550906e-03 -6.3732667e-03 5.1995669e-03 6.6701085e-03 -6.8332190e-03 9.5912622e-04 -6.0073044e-03 1.6457489e-03 -4.2902068e-03 -3.4407019e-03 2.1845249e-03 8.6601572e-03 6.7274263e-03 -9.6765375e-03 -5.6223669e-03 7.8813564e-03 1.9897944e-03 -4.2563844e-03 6.0017925e-04 9.5213391e-03 -1.1027736e-03 -9.4257686e-03 1.6080372e-03 6.2318267e-03 6.2837554e-03 4.0911403e-03 -5.6494535e-03 -3.6906224e-04 -5.4975819e-05 4.5719738e-03 -8.0400715e-03 -8.0183875e-03 2.6508723e-04 -8.6073391e-03 5.8195251e-03 -4.1874297e-04 9.9714566e-03 -5.3436314e-03 -4.8676057e-04 7.7577275e-03 -4.0684748e-03 -5.0161611e-03 1.5903190e-03 2.6515629e-03 -2.5645630e-03 6.4464780e-03 -7.6598520e-03 3.3933877e-03 4.8945239e-04 8.7330267e-03 5.9816493e-03 6.8145730e-03 7.8237765e-03].

[0119] congz: [7.0887972e-03 -1.5679311e-03 7.9474971e-03 -9.4886590e-03 -8.0294991e-03 -6.6403723e-03 -4.0034559e-03 4.9892161e-03 -3.8135601e-03 -8.3199050e-03 8.4117772e-03 -3.7470032e-03 8.6086961e-03 -4.8957514e-03 3.9185928e-03 4.9220156e-03 2.3926091e-03 -2.8188038e-03 2.8491234e-03 -8.2562380e-03 -2.7655410e-03 -2.5911594e-03 7.2490047e-03 -3.4634043e-03 -6.5997029e-03 4.3404270e-03 -4.7448635e-04 -3.5975575e-03 6.8824720e-03 3.8723112e-03 -3.9002013e-03 7.7188731e-04 9.1435025e-03 7.7546551e-03 6.3618706e-03 4.6673012e-03 2.3844885e-03 -1.8416261e-03 -6.3712932e-03 -3.0181170e-04 -1.5653897e-03 -5.7228567e-04 -6.2628724e-03 7.4340464e-03 -6.5914942e-03 -7.2392775e-03 -2.7571463e-03 -1.5154004e-03 -7.6357173e-03 6.9823978e-04 -5.3261113e-03 -1.2755442e-03 -7.3651122e-03 1.9605684e-03 3.2731986e-03 -2.3138524e-05 -5.4483581e-03 -1.7260861e-03 7.0849154e-03 3.7362576e-03 -8.8810492e-03 -3.4135508e-03 2.3541022e-03 2.1380186e-03 -9.4640087e-03 4.5711659e-03 -8.6569972e-03 -7.3870681e-03 3.4831120e-03 -3.4709596e-03 3.5644697e-03 8.8940905e-03 -3.5743236e-03 9.3204239e-03 1.7110371e-03 9.8477742e-03 5.7050418e-03 -9.1494843e-03 -3.3277320e-03 6.5301750e-03 5.6027793e-03 8.7055154e-03 6.9261026e-03 8.0388878e-03 -9.8230103e-03 4.2988253e-03 -5.0300765e-03 3.5123848e-03 6.0566878e-03 4.3921303e-03 7.5123594e-03 1.4977145e-03 -1.2649416e-03 5.7683992e-03 -5.6395675e-03 3.8590431e-05 9.4565870e-03 -5.4812501e-03 3.8142777e-03 -8.1130220e-03].

[0120] eijninz: [8.12773407e-03 -4.45578340e-03 -1.06865796e-03 1.00531476e-03 -1.92755222e-04 1.14654948e-03 6.11560885e-03 -1.80267671e-05 -3.24553018e-03 -1.51350908e-03 5.89924259e-03 1.51475996e-03 -7.24940328e-04 9.33183357e-03 -4.92078578e-03 -8.38908425e-04 9.17826686e-03 6.74845045e-03 1.50036125e-03 -8.88163969e-03 1.14986673e-03 -2.28714524e-03 9.37237125e-03 1.21458562e-03 1.48934429e-03 2.40741204e-03 -1.83388696e-03 -4.99998685e-03 2.31690821e-04 -2.01370311e-03 6.60177972e-03 8.93953443e-03 -6.75628253e-04 2.97454256e-03 -6.10702578e-03 1.70221494e-03 -6.92271767e-03 -8.69538542e-03 -5.90097951e-03 -8.95432942e-03 7.27961538e-03 -5.77104511e-03 8.27600807e-03 -7.24602817e-03 3.42364958e-03 9.67562292e-03 -7.78738037e-03 -9.94366594e-03 -4.32872586e-03 -2.68381229e-03 -2.71258992e-04 -8.83115549e-03 -8.62080418e-03 2.79877847e-03 -8.20726342e-03 -9.06978361e-03 -2.33833911e-03 -8.63223616e-03 -7.05655664e-03 -8.40141717e-03 -3.00433545e-04 -4.56277328e-03 6.62979158e-03 1.52564549e-03 -3.33915208e-03 6.10717945e-03 -6.01436943e-03 -4.65450110e-03 -7.20789703e-03 -4.34037345e-03 -1.80647848e-03 6.48921682e-03 -2.77089002e-03 4.92026517e-03 6.90463092e-03 -7.46455695e-03 4.56423778e-03 6.12838753e-03 -2.95542367e-03 6.62548840e-03 6.12594094e-03 -6.44397922e-03 -6.76124031e-03 2.53999163e-03 -1.62579073e-03 -6.06668275e-03 9.50262044e-03 -5.12723019e-03 -6.55629579e-03 -1.22058496e-04 -2.70250253e-03 4.46100021e-04 -3.53698037e-03 -4.20572527e-04 -7.04979990e-04 8.24193878e-04 8.19614157e-03 -5.74024674e-03 -1.65922928e-03 5.57112927e-03].

[0121] ……

[0122] The third step: Execute the "Latin Zhuang Language Vector Representation and Normalization Module"

[0123] Input the output result of the language model in the second step and compare it with the supervised data.

[0124] Update the weight parameters using the cross-entropy loss function.

[0125] Use the backpropagation algorithm to train the neural network to converge.

[0126] Calculate the normalized representation of the Latin Zhuang language word vector using formula (3).

[0127] Output the normalized representation of the Latin Zhuang language vector.

[0128] The fourth step: Execute the "Latin Zhuang Language Vector Representation and Calculation Module"

[0129] Input the normalized representations of any two Latin Zhuang language word vectors.

[0130] Calculate the cosine similarity between any two Zhuang language words in Latin using formula (4). The value range of the cosine similarity is 0 - 1. The larger the value, the more similar the two Zhuang language words in Latin are.

[0131] Input any Zhuang language sentence in Latin. Concatenate the vector representations of each Zhuang language word in the sentence to obtain the vector representation of the Zhuang language sentence in Latin.

[0132] Calculate the cosine similarity between any two Zhuang language sentences in Latin using formula (4). The value range of the cosine similarity is 0 - 1. The larger the value, the more similar the two Zhuang language sentences in Latin are.

[0133] After processing the Zhuang language text in Latin "March 3rd" (Zhuang language version) through the Zhuang language vector representation and calculation method of the present invention, the vector representation of this Zhuang language text in Latin is finally obtained.

Claims

1. A method for representing and calculating Latin Zhuang language vectors, characterized in that: It includes a representation and calculation model composed of a sequentially connected Latin Zhuang language preprocessing module, a Latin Zhuang language language modeling module, a Latin Zhuang language vector representation normalization module, and a Latin Zhuang language vector representation and calculation module. The representation and calculation method includes the following steps: (1) The Latin Zhuang language preprocessing module inputs the text corpus of the Latin Zhuang language, performs lowercase processing on the input Latin Zhuang language text corpus, and divides the Zhuang language text corpus into sentences according to punctuation marks, obtaining a sentence text sequence composed of several sentences; Perform word segmentation on the output sentence text sequence according to the Latin Zhuang language space, and divide the sentence sequence into a word sequence composed of individual independent Latin words; Output the sequence numbers of the words after word segmentation in the corpus respectively; (2) The Latin Zhuang language language modeling module inputs the number of window words set, calculates the co-occurrence times of any two Latin Zhuang language words in the window, and constructs a window word co-occurrence matrix according to the co-occurrence times of any two words in the window; Set the dimension of the output Latin Zhuang language vector and initialize the weight matrix of the Latin Zhuang language vector; input the window word co-occurrence matrix into a three-layer neural network, perform weighted summation calculation with the weight matrix of the Latin Zhuang language through the linear hidden layer of the neural network, and classify and output the result of the summation calculation through the nonlinear softmax function; (3) The Latin Zhuang language vector representation normalization module inputs the classification output result of the language modeling module, compares it with the existing supervised data, and updates the parameters of the weight matrix using the cross-entropy loss; Set a threshold to make the neural network training process converge, obtain the weight vector of the hidden layer at this moment, and obtain the vector representation matrix of the Latin Zhuang language through weighted calculation; Calculate each element in the column vector of the Latin Zhuang language representation matrix divided by the length of the column vector to obtain the normalized representation of the column vector of the Latin Zhuang language vector matrix; (4) The Latin Zhuang language vector representation and calculation module inputs the normalized vector representation of the Latin Zhuang language to obtain the vector of any Latin Zhuang language word; uses the cosine similarity calculation formula to calculate the semantic similarity between any two Latin Zhuang language words, and the value of the similarity represents the semantic similarity between the two words; Calculate the cosine similarity of any two sentences, and the value of the similarity represents the semantic similarity between the two sentences.

2. The Latin Zhuang language vector representation and calculation method according to claim 1, characterized in that: The processing steps of the described Latin Zhuang language preprocessing module are as follows: P201 starts; P202 reads in the Latin Zhuang language corpus; P203 performs lowercase processing on the Latin Zhuang language corpus; P204 divides the Latin language corpus into sentences to generate a sentence sequence; P205 performs word segmentation on the sentence sequence after sentence division according to spaces; P206 outputs the list of Latin words after word segmentation; P207 ends.

3. The method for representing and calculating the Latin Zhuang language vector according to claim 1, characterized in that: The calculation formula of the described Latin Zhuang language language modeling module is defined as follows: (1) The calculation formula for the co-occurrence times of two Latin Zhuang language words in the window To obtain the semantic relevance between two Latin Zhuang language words, use the co-occurrence times of any two Latin Zhuang language words in the corpus to calculate. When the number of window words is 5, the calculation formula is as follows: (2) The calculation formula for the co-occurrence matrix in the window When the number of window words is 5, the co-occurrence matrix calculation formula between word i and its two adjacent words before and after is as follows: In formula (2) represents the number of times that word i co-occurs with the next word i+1.

4. The Latin Zhuang language vector representation and calculation method according to claim 2, wherein: The processing steps of the above-mentioned Latin Zhuang language modeling module are as follows: P301 starts; P302 sets the number of window words N = 5; P303 uses formula (1) to count and calculate the co-occurrence times between the middle word i in the window and its two adjacent words before and after; P304 uses formula (2) to construct a co-occurrence matrix from the co-occurrence times in P303; P305 sets the output Latin Zhuang dimension D = 100; P306 initializes the weight matrix T; P307 inputs the co-occurrence matrix into a three-layer neural network; P308 obtains the output vector H of the hidden layer of the neural network; P309 calculates the Latin Zhuang vector representation W = T × H; P310 uses the softmax function to output the Latin Zhuang word vector representation; P311 updates the weight T using stochastic gradient descent. If the threshold is not reached, execute P306. If the threshold is reached, then execute P312; P312 ends.

5. The Latin Zhuang language vector representation and calculation method according to claim 1, characterized in that: The processing steps of the above-mentioned Latin Zhuang vector representation normalization module are as follows: P401 starts; P402 compares the output result of the language model with the supervised data; P403 updates the parameters using the cross-entropy loss function; P404 uses the backpropagation algorithm to converge the neural network; P405 uses formula (3) to calculate the normalization of the Latin Zhuang word vector; The normalization of the Latin Zhuang word vector adopts column vector normalization, and the word vector normalization calculation formula is as follows: In formula (3), [w1, w2,..., w i ..., w n is the word vector representation of the word w; P406 outputs the normalized representation of the Latin Zhuang word vector; P407 ends.

6. The Latin Zhuang language vector representation and calculation method according to claim 1, characterized in that: The processing steps of the above-mentioned Latin Zhuang vector representation and calculation module are as follows: P501 starts; P502 uses the output of the normalized Latin Zhuang word vector to obtain the word vector of any Latin Zhuang word; P503 uses formula (4) to calculate the cosine similarity between any two Latin Zhuang words; The word vector semantic similarity calculation formula between Latin Zhuang word i and word j is as follows: The value range of the cosine similarity is [0, 1], and the larger the value, the closer the semantics of the two words; P505 calculates the normalized word vector of each Latin Zhuang word for any input sentence; P506 splices each Latin Zhuang word vector to obtain a sentence vector; P507 sets the length of the sentence, and fills the sentence with insufficient length with zero vectors; P508 calculates the cosine similarity between any two sentences; P509 ends.

Citation Information

Patent Citations

  • A word vector learning method based on maximizing the energy of word relations

    CN109543191A

  • Chinese electronic medical record entity extraction method based on character and word information fusion

    CN111243699A