English text sentence component dependence and vocabulary arrangement similarity checking method
By constructing and calculating the triple similarity of core words, modifiers and word dependencies in English text, the problem that the existing technology cannot check the similarity between sentence component dependence and vocabulary arrangement is solved, and more accurate English text is achieved Similar checks.
Patent Information
- Application Number
- CN202411523936.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing English text similarity checking methods cannot effectively check the similarity between sentence component dependence and vocabulary arrangement, and can only analyze the similarity between words and phrases.
A method for checking similarity between component dependence and vocabulary arrangement in English text sentences is proposed. By constructing triplets of core words, modifiers and word dependence relationships, vectorization is performed, and triplet similarity, component dependence similarity and vocabulary are calculated. Arrange similarity.
It realizes an effective check on the similarity between sentence components dependence and vocabulary arrangement in English text, and can more accurately analyze the similarity between sentences and improves the accuracy and comprehensiveness of similarity checks.
Smart Images

Figure CN119476252A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method for checking the similarity of sentence component dependency and vocabulary arrangement of English text. The present invention is only applicable to the similarity analysis of sentence component dependency and vocabulary arrangement of English text. Background Art
[0002] The existing English text similarity checking method adopts the edit distance method to analyze the similarity between words and phrases in English text. This English text similarity checking method can only check whether the words and phrases in English text are similar, but cannot check whether the sentence component dependency and vocabulary arrangement of English text are similar. The present invention proposes an English text sentence component dependency and vocabulary arrangement similarity checking method, which can check the sentence component dependency and vocabulary arrangement similarity of English text. Summary of the invention
[0003] The invention discloses a method for checking English text sentence component dependency and vocabulary arrangement similarity. The method comprises an English text sentence component dependency similarity checking module and an English text vocabulary arrangement similarity checking module.
[0004] The processing flow of the English text sentence component dependency similarity check module is as follows: first, input the English text to be checked, perform word segmentation and sentence processing, delete special characters, and convert uppercase words to lowercase words on the English text; second, construct a triple of core words, modifiers, and word dependencies based on the core words and modifiers in the English text sentence component dependencies, as well as the dependency between two words; third, vectorize the words in the constructed triples; fourth, generate a core word similarity matrix, a modifier similarity matrix, and a word dependency similarity matrix by calculating the core word similarity, modifier similarity, and word dependency similarity in the constructed triples; fifth, generate a triple similarity matrix based on the three generated similarity matrices, and the calculation of each value in the triple similarity matrix adopts the core word similarity matrix. The calculation formula for the similarity of triplets consisting of words, modifiers and word dependencies is used. Each row of the generated triple matrix is traversed, and the most similar triples in each row are selected to represent the final triple similarity value; Sixth, corresponding weight factors are assigned to word dependencies, and sentences in the English text are combined in pairs to obtain the combination of all sentence pairs in the English text. The combination of all sentence pairs is calculated to obtain the component dependency similarity of all sentence pairs, and the sentence component dependency similarity matrix of the English text is constructed. The calculation formula for the component dependency similarity of English sentence pairs is used for each value of the sentence component dependency similarity matrix; Seventh, by traversing each row of the sentence component dependency similarity matrix, the value corresponding to the position of the most similar sentence pair is selected to represent the component dependency similarity of the final sentence pair, and the coordinates of the position are stored in the index file.
[0005] The processing flow of the English text vocabulary arrangement similarity check module is as follows: first input the English text to be checked, perform word segmentation and sentence processing on the English text, delete special characters, and convert uppercase words to lowercase words; second, traverse and read the sentence index file, delete stop words from the sentence pairs in the English text, and obtain the joint word sets corresponding to the two sentences respectively; third, perform a union operation on the joint word sets between the two sentences to obtain the joint word sets of the two sentences; fourth, calculate the vocabulary arrangement vector corresponding to the sentence pair based on the joint word set, and each value in the vocabulary arrangement vector is the index number of the corresponding position of the word in the joint word set; fifth, use the vocabulary arrangement similarity calculation formula to calculate the two vocabulary arrangement vectors respectively, and finally use the English sentence pair vocabulary arrangement similarity calculation formula to calculate the vocabulary arrangement similarity of the English text sentence pair.
[0006] The calculation formula of the present invention is defined as follows:
[0007] 1. The similarity calculation formula of the triple consisting of the core word, modifier and word dependency relationship
[0008]
[0009] In formula (1), core word similarity refers to the similarity of core words in English text sentence pairs, modifier similarity refers to the similarity of modifiers in English text sentence pairs, and word dependency similarity refers to the similarity of dependency between core words and modifiers in English text sentence pairs.
[0010] 2. English sentence component dependency similarity calculation formula
[0011]
[0012] In formula (2), the component dependency similarity of an English sentence pair refers to the similarity of all triples in two English sentences. The components of an English sentence refer to core words, modifiers, and the word dependency relationship between core words and modifiers. m represents the number of triples in an English text sentence pair, and i represents the i-th triple in an English text sentence pair.
[0013] 3. English sentence vocabulary sorting vector calculation formula
[0014] English sentence vocabulary permutation vector = [x1, x2, ..., x n ] (3)
[0015] In formula (3), x n The value of each dimension of the vocabulary arrangement vector in the English sentence represents the index number of the corresponding position of the word in the joint word set. The joint word set is obtained by performing a union operation on the joint word sets of two sentences.
[0016] 4. English sentence pair vocabulary arrangement similarity calculation formula
[0017]
[0018] In formula (4), the symbol “||” represents the square root of the sum of the squares of the dimensionality differences of the sentence pair vectors. The vocabulary arrangement vector of the first sentence represents the vocabulary arrangement vector of the first sentence in the English text sentence pair. The vocabulary arrangement vector of the second sentence represents the vocabulary arrangement vector of the second sentence in the English text sentence pair. The vocabulary arrangement vector is obtained by formula (3).
[0019] The processing flow of the English text sentence component dependency similarity checking module and the English text vocabulary arrangement similarity checking module of the present invention is as follows.
[0020] like Figure 2 As shown, the processing flow of the English text sentence component dependency similarity check module is as follows:
[0021] P201 starts;
[0022] P202 reads English texts respectively;
[0023] P203 performs sentence processing on the English text, deletes special characters, and outputs the sentence processing result of the English text after preprocessing;
[0024] P204 reads the sentence segmentation results of the English text after processing in step P203;
[0025] P205 constructs a triple based on the core word and modifier in the text sentence, as well as the dependency relationship between two words;
[0026] P206 vectorizes the core words and modifiers in the triples;
[0027] P207 calculates the core word similarity and modifier word similarity matrix based on the output result of step P206, and then calculates the word dependency similarity matrix;
[0028] P208, based on the output result of step P207, uses the triple similarity calculation formula (1) consisting of the core word, the modifier word and the word dependency relationship to obtain the triple similarity, thereby obtaining the triple matrix;
[0029] P209 outputs the result according to step P208, traverses and selects each row of the triple matrix, and selects the most similar triple in each row to represent the final triple similarity value;
[0030] P210 assigns corresponding weight factors to the word dependencies in the triple;
[0031] P211 Combine sentences in two texts in pairs to obtain multiple sentence pairs;
[0032] P212 According to the English sentence pair component dependency similarity calculation formula (2), the component dependency similarity of the sentence pair is obtained;
[0033] P213 obtains the component dependency similarity matrix of all sentence pairs in the text according to the output result of step P212;
[0034] P214 traverses each row of the component dependency similarity matrix according to the output result of step P213, selects the value of the position corresponding to the most similar sentence pair to represent the component dependency similarity of the final sentence pair, and stores the coordinates of the position in the index file;
[0035] P215 stores the position coordinates corresponding to the most similar sentence pairs into the sentence index file according to the output result of step P214;
[0036] P216 ends.
[0037] like Figure 3 As shown, the processing flow of the English text vocabulary arrangement similarity check module is as follows:
[0038] P301 starts;
[0039] P302 reads English texts respectively;
[0040] P303 performs sentence processing on the English text, deletes special characters, converts uppercase words into lowercase words, and outputs the sentence processing result of the English text after preprocessing;
[0041] P304 traverses and reads the sentence index file to obtain sentence pairs;
[0042] P305 removes stop words from the sentence pairs in the English text to obtain the joint word set of two sentences;
[0043] P306 performs a union of the two joint word sets to obtain a joint word set;
[0044] P307 calculates two vocabulary arrangement vectors respectively using vocabulary arrangement similarity calculation formula (3) according to the output result of step P306;
[0045] P308, based on the output result of step P307, brings the vocabulary arrangement vector into the English sentence pair vocabulary arrangement similarity calculation formula (4), and finally obtains the English text sentence pair vocabulary arrangement similarity;
[0046] P309 ends. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is the overall processing flow chart of the method of the present invention;
[0048] Figure 2 It is a processing flow chart of the English text sentence component dependency similarity checking module of the method of the present invention; Figure 3 It is a processing flow chart of the English text vocabulary arrangement similarity checking module of the method of the present invention; DETAILED DESCRIPTION
[0049] The specific implementation of the method for checking the similarity of English text sentence component dependency and vocabulary arrangement of the present invention is divided into the following steps:
[0050] Step 1: Execute the "English text sentence component dependency similarity check module"
[0051] In the implementation manner of the present invention, the English text sentence component dependency similarity check module first performs sentence processing, deletes special characters and other operations on the English text to be checked, and then constructs core word triplets based on the sentence dependency core words and modifiers in the English text, as well as the dependency relationship between two words, and adds the core words and modifiers in the triplet to obtain a triplet vector, and finally calculates the triplet similarity, and calculates the English sentence component dependency similarity based on the triplet similarity. Finally, the English sentence component dependency similarity and sentence index information are stored in a file. In the implementation manner of the present invention, an English text titled "Importance of Education" is input, and the English texts are shown as follows:
[0052] English text to be checked
[0053] As a school student, I know that education is the cornerstone of personal growth and social progress. Firstly, it equips us with the knowledge and skills necessary to thrive in a competitive society. From specialized courses to real-life lessons, education prepares us to face challenges with confidence and competence.
[0054] Secondly, education also develops critical thinking and analytical skills. It encourages us to question assumptions, challenge norms and explore new ideas. Through education, we develop the ability to think independently and make informed decisions that contribute positively to our personal and professional lives.
[0055] Finally, education is a key way to cultivate talents, providing strong support for the country's economic, scientific, technological and cultural development. By raising the people's level of education, China is able to cultivate more high-quality talents, it promotes the overall progress and civilized development of Chinese society.
[0056] In short, education is not just about acquiring knowledge, but about enabling individuals to realize their full potential and make a contribution to their country. We must actively pursue educational opportunities and recognize the transformative power of education.
[0057] Original English text
[0058] Education is very important in today's society.Firstly,education isthe knowledge and skills necessary for us to thrive in a competitivesociety.Education prepares us to face challenges with confidence andcompetence at all times,from professional courses to life lessons.
[0059] In addition,education equips us with critical thinking and analyticalskills.Through education,we can be equipped to think independently and makedecisions that contribute positively to our personal and professional lives.
[0060] In another way,education is an important support for China'sdevelopment,and it can provide strong support for the country's economicdevelopment,scientific and technological level and cultural development.Thelong-term prosperity of the country and the well-being of its people can berealized only through improving the quality of education.
[0061] In conclusion, education does not only enable individuals to realize their full potential and contribute to national development. Therefore, as a student it is important to recognize the importance of education for our personal and national development.
[0062] (1) For sentence processing of the English text, the results are as follows:
[0063] The English text to be checked
[0064] 1 - [As a school student, I know that education is the cornerstone of personal growth and social progress.]
[0065] 2 - [Firstly, it equips us with the knowledge and skills necessary to thrive in a competitive society.]
[0066] 3 - [From specialized courses to real - life lessons, education prepares us to face challenges with confidence and competence.]
[0067] 4 - [Secondly, education also develops critical thinking and analytical skills. ] 5 - [It encourages us to question assumptions, challenge norms and explore new ideas.]
[0068] 6 - 通过教育,我们培养独立思考的能力,并做出明智的决策,这对我们的个人生活和职业生活都有积极的贡献。
[0069] 7 - 最后,教育是培养人才的关键途径,为国家的经济、科学、技术和文化发展提供有力支持。
[0070] 8 - 通过提高人民的教育水平,中国能够培养更多高素质的人才,推动中国社会的全面进步和文明发展。
[0071] 9 - 简而言之,教育不仅仅是获取知识,更是让个人充分发挥潜力,为国家做出贡献。
[0072] Original English text
[0073] 1 - 教育在当今社会非常重要。
[0074] 2 - 首先,教育是我们在竞争激烈的社会中茁壮成长所需的知识和技能。
[0075] 3-[Education prepares us to face challenges with confidence andcompetence at all times,from professional courses to life lessons.]
[0076] 4-[In addition,education equips us with critical thinking andanalytical skills.]
[0077] 5-[Through education,we can be equipped to think independently andmake decisions that contribute positively to our personal and professionallives.]
[0078] 6-[In another way,education is an important support for China'sdevelopment,and it can provide strong support for the country's economicdevelopment,scientific and technological level and cultural development.]
[0079] 7-[The long-term prosperity of the country and the well-being of itspeople can be realized only through improving the quality of education.]
[0080] 8-[In conclusion,education does not only enable individuals torealize their full potential and contribute to national development.]
[0081] 9-[Therefore, as a student it is important to recognize the importance of education for our personal and national development.]
[0082] (2) Triples are constructed for the sentences in the two English passages. The results are as follows:
[0083] English text to be checked
[0084] Sentence 1(student,As,case),(student,a,det),(student,school,compound),(know,student,obl:as),(know,I,nsubj),(ROOT,know,root),(cornerstone,that,mark),(cornerstone,education,nsubj),(cornerstone,is,cop),(cornerston e,the,det),(know,cornerstone,ccomp),(growth,of,case),(growth,personal,amod),(cornerstone,growth,nmod:of),(progress,and,cc),(progress,social,amod),(cornerstone,progress,nmod:of),(growth,progress,conj:and)
[0085] …
[0086] sentence 10(pursue,We,nsubj),(recognize,We,nsubj),(pursue,must,aux),(pursue,actively,advmod),(ROOT,pursue,root),(opportunities,educational,amod),(pursue,opportunities,obj),(recognize,and,cc),(pursue,recognize,conj:and),(power,the,det),(power,transformative,amod),(recognize,power,obj),(education,of,case),(power,education,nmod:of)
[0087] Original English text
[0088] Sentence 1(important,Education,nsubj),(important,is,cop),(important,very,advmod),(ROOT,important,root),(society,in,case),(society,today,nmod:poss),(today,'s,case),(important,society,obl:in)
[0089] ……
[0090] Sentence 9(important,Therefore,advmod),(student,as,case),(student,a,det),(important,student,obl:as),(important,it,nsubj),(recognize,it,ns ubj:xsubj),(important,is,cop),(ROOT,important,root),(recognize,to,mark),(important,recognize,xcomp),(importance,the,det),(recognize ,importance,obj),(education,of,case),(importance,education,nmod:of),(development,for,case),(development,our,nmod:poss),(development,personal,compound),(national,and,cc),(personal,national,conj:and),(development,national,compound),(recognize,development,obl:for)
[0091] (3) The triples of core words and modifiers in the English text are vectorized, where the core words and modifiers have a word vector dimension of 300. The results are as follows:
[0092] English text to be checked
[0093] The word vector of the core word of the first triple in sentence 1 [-0.17354 -0.24319 0.053452 -0.26109 0.38268 -0.29653 0.083852 -0.32169 0.15131 -0.9557 -0.066864 0.60690.76895 -0.03473 0.22002 0.054201 0.60046 0.21231 -0.19465 -0.42065 -0.102550.13275 -0.21647 0.19864 -0.40713 0.053763 0.12418 0.15331 0.028677 -0.193280.10747 -0.57035 -0.06532 0.36929 -0.91206 -0.40628 -0.15784 -0.04464 -0.087597 0.090843 0.53778 -0.56325 -0.42146 0.24712 -0.102 -0.045638 -0.060849 0.75258 -0.20409 -0.61832 0.27005 -0.067166 0.0018298 0.1711 0.1786-0.13522 0.42749 -0.040237 -0.11687 -0.36497 0.30304 0.1239 -0.00422740.47082 -0.60705 -0.2746 0.17079 -0.14009 -0.27486 0.19345 -0.22945 -0.074551-0.28176 0.17424 -0.29497 0.23893 0.029792 0.14545 0.18294 0.15164 0.064472 -0.3498 0.051402 -0.018188 0.041326 -0.1018 0.039224 -0.28511 -0.617560.094616 -0.25973 0.014945 -0.17069 -0.084753 0.7178 0.11422 0.28718 0.077269-0.16699 0.045772 -0.359 -0.21323 0.14497 -0.16233 0.38281 -0.022212 0.472060.20043 0.27197 -0.28235 -0.50042 -0.29787 0.59838 0.037282 0.18367 0.18232 -0.029056 -0.026404 0.05982 0.146 -0.0030843 1.1628 -0.10191 0.38915 0.43375 -0.14014 0.13268 -0.63488 0.51159 -0.17917 -0.35081 -0.052044 -0.1112 -0.706540.37646 0.052922-0.42105 0.29974 -0.23137 0.29782 0.60306 0.26989 0.048716 -0.25238 0.35802 0.11701 -0.12656 -0.20669 0.25375 0.096585 0.89743 0.0694770.70449 0.6464 0.19253 -0.018205 -0.09417 0.12029 -0.51626 -0.57525 0.29842 -0.167590.1996 -0.4289 -0.40478 -0.68878 -0.39256 0.23887 0.33337 0.133790.39734-0.17772 -0.74419 0.049038 0.21368 0.052148 -0.19793 -0.603640.136470.28507 0.22165 -0.72391 -0.39423 -0.21487 0.077877 0.18741 -0.69936-0.028105 0.32932 0.57378 -0.2227 -0.026564 -0.29643 -0.12938 -0.11859 0.51787-0.0054817 0.0054538 -0.087312 -0.44221 0.41763 0.075215 -0.10789 0.11641 -0.26596 -0.59762 -0.28858 0.43134 0.14175 0.078326 0.653790.015019 0.0082632-0.087615 -0.23133 0.15133 0.042002 -0.10898 0.19038-0.1205 -0.32398 0.72856-0.24251 0.2977 -0.0034756 0.42557 -0.29279-0.71382 -0.39535 0.38058 0.211730.061782 0.077676 -0.45748 0.14287 0.18937 0.203 0.33633 0.053148 -0.162610.95603 0.6669 -0.24884 -0.18995 -0.92270.21424 -0.0027574 0.17988 -0.286690.28301 0.69782 -0.033009 -0.33567-0.10929 0.74921 0.011132 0.2532 0.37947 -0.18872 -0.45535 -0.46355 -0.178110.48092 -0.04634 -0.2911 -0.21017 -0.187330.51647 -0.53055 0.76003-0.31745 0.064124 0.19352 -0.30535 0.12628 -0.22487 -2.1313 -0.26715 0.27908 0.3218 -0.22084 -0.029111 0.099611 -0.20906 0.00148770.77484 -0.21874 0.4923 -0.32626 -0.22296 0.20883 -0.55722 -0.21543 -0.124740.504950.081237 0.53363 0.040683 -0.6322 0.10496].
[0094] The word vector of the modifier of the first triple in sentence 1 [-0.056826 0.23863 0.44515 -0.0148630.1713 -0.10457 0.04575 0.32209 -0.28611 -1.7106 0.22951 0.22666 -0.15038 0.048056 0.33896 0.24517 -0.57485 -0.25071 -0.0033446 -0.061135 -0.0051790.26721 0.065713 0.2751 -0.11415 0.076964 -0.11396 -0.17367 0.25070.379-0.10846 0.086291 -0.15533 0.25446 -0.94704 0.10617 0.084343 0.22894-0.18593 -0.091148 -0.12637 -0.0066005 -0.14456 0.042843 0.18968 0.067754-0.019222 0.34123 -0.078346 0.12396 0.080519 -0.15997 0.29014 0.03687-0.036792-0.0076505 -0.21335 0.17402 0.32853 -0.013976 0.23121 0.442860.54756 0.0319420.050643 -0.2723 0.11318 0.22192 0.24858 -0.0076112-0.20666 0.17354 -0.104190.056558 -0.037414 -0.1826 0.41065 0.6852 -0.18628 0.13912 -0.048764 -0.069608 -0.064254 -0.023668 0.30091 0.083493 -0.39237 0.46004 0.202340.01315 -0.20761 -0.0022161 0.051497 -0.22715 -0.50697 0.23306 -0.3201 -0.014049 0.21677 -0.17386 0.20849 0.050146 0.11978 0.254190.37301 0.14686 -0.23652 0.52242 0.069126 0.17529 -0.002298 0.12054 -0.18213 -0.1632 0.243380.30967 0.35451 -0.34301 0.16931 -0.18414 0.11462-0.23398 -0.13362 0.285480.042403 0.20324 -0.15008 0.1497 0.35743 -0.14366 -0.14729 0.29442 0.36739 -0.019627 0.021403 -0.30437 0.15316 0.017475 0.11758 0.46037 0.24902 0.225150.19306 0.51874 -0.24188 0.0067025 0.510480.16012 -0.52281 -0.24828 0.38047 -0.12651 0.0043307 0.15807 0.18793-0.15368 -0.27258 -0.14053 0.36902 -0.0535790.19715 -0.28491 0.26238-0.0011838 -0.22213 0.039658 -0.32987 0.22877 0.474820.37566 0.37278 0.044077 -0.5171 0.38193 -0.033861 -0.28934 -0.140130.0096003 -0.42021 0.6281 0.256 0.31528 0.28145 0.17193 0.13255 -0.1203 -0.47558 -0.056726 0.10113 0.22485 0.17682 0.46901 -0.0721 -0.19534 -0.19161 -0.21283 -0.13168 -0.26071 0.19202 -0.1396 1.0061 -0.046612 0.062724 -0.0336780.107960.13363 0.089588 -0.06322 0.038797 0.16555 0.23608 -0.049322 0.15457-0.12405 0.2511 0.21012 0.013695 0.10874 -0.16885 -0.12889 0.094318 0.10308-0.33216 0.11497 0.10646 0.32881 0.035044 0.20747 -0.30386 -4.4732E-4-0.0483790.0254 -0.0.39434 0.047665 0.12588 0.37809 0.31197 -0.010997-0.45973 0.41432 -0.18112 0.12212 -0.10869 0.176 -0.55822 0.14679 0.67731-0.34697 0.0676240.14096 0.44492 -0.13261 -0.32253 -0.13906 0.4692 -0.3191 -0.28152 -0.0532590.11532 0.22467 -0.168 -0.41067 0.38376 0.25146 -0.27562 -0.2707 -0.33162 -0.0064134 0.19679 0.13543 0.02376 0.026737 -0.058935 0.050393 -0.0695840.041622 -1.9014 -0.34915 0.38343 0.16815 -0.23634 0.055377 0.15216 0.165160.25894 0.35041 3.3606E-4 0.26671 -0.058250.020595 -0.037092 0.02902 -0.19494-0.19114 -0.022407 0.27512 -0.31988-0.31911 -0.2283 0.15058]…….
[0095] Original English text
[0096] The word vector of the core word of the first triple in sentence 1 [0.23742 0.10227 0.020129 -0.45980.38031-0.02312 -0.41138 0.17419 -0.45459 -2.1113 -0.18164 -0.30143 -0.137390.36605 -0.12323 -0.53453 -0.50244 -0.30108 -0.21171 0.026677 -0.115520.14041 0.27622 0.15262 -0.33663 -0.25601 -0.35266 -0.23018 -0.192010.311460.42691 0.46049 -1.0289 0.16542 -0.74515 0.41644 0.36312 0.37067-0.23914 -0.38753 0.29871 -0.55714 -0.13163 -0.34564 -0.23977 0.36676 0.28490.4954 -0.28397 0.60126 0.19726 0.14862 -0.13933 -0.1375 -0.3742 0.34422-0.276660.048394 0.47699 0.41375 0.35223 -0.069964 0.27557 0.11858 0.136850.28332 -0.028147 0.40988 -0.17754 0.25614 -0.38936 0.074637 -0.23105-0.019972 -0.13213 -0.24211 -0.0065713 0.12045 -0.15536 -0.15892 -0.515-0.26252 0.28131-0.21372 0.33389 0.54999 -0.11584 0.1017 -0.22609 0.11208-0.00314 0.078501 -0.37652 -0.031265 0.2147 0.037163 0.031461 -0.476690.10733 0.14666 0.0179930.033742 -0.049264 -0.19895 0.069923 -0.14071-0.094304 0.15721 -0.0993240.19255 0.059596 -0.046276 -0.21658 -0.096115-0.25588 -0.040946 0.52519 -0.019395 0.14144 -0.0096384 -0.12283 0.029448 0.24035 -0.23854 0.094082 -0.033102 0.060435 0.10865 -0.11544 -0.19649 0.49286 -0.24943 0.045552 -0.28061 -0.31221 -0.36973 0.33045 -0.18573 0.39232 0.47127 -0.066649 -0.141110.50598 -0.1716 -0.13737 -0.22247 0.20968 0.33599 -0.75281 0.26426 -0.21870.10926 -0.20494 -0.12364 0.16171-0.19322 0.1014 0.049202 0.043313 -0.10402 -0.11171 0.092624 0.1933-0.24142 -0.089586 0.026791 0.084296 -0.00317120.10945 1.001 0.46118-0.49048 -0.61932 0.21188 0.52683 -0.033891 0.04489 -0.21321 -0.46244-0.024046 -0.049367 0.030795 0.048561 -0.15195 0.0990950.16178 -0.36694 0.16123 -0.33765 0.098224 0.043577 0.27112 0.39864 0.127060.51089 -0.42379 0.3467 -0.33506 0.046156 -0.34733 0.7826 -0.074445 -0.28826-0.40227 0.17408 0.13641 0.14192 -0.12351 0.037849 0.28567 0.05465 -0.0144810.37123 0.2626 0.029205 0.11122 -0.18724 0.25086 0.38875 0.21976 -0.12042 -0.50688 -0.19816 0.30553 0.3486 0.046491 -0.17698 0.53191 -0.2653 0.21164 -0.234710.1755 0.20213 0.4005 0.056106 0.41016 0.32028 -0.11679 0.071940.19591-0.28286 0.49895 0.56229 -0.047331 -0.88056 0.15936 -0.29381 0.480740.12642 -0.11697 -0.040651 -0.47003 -0.32601 -0.15169 -0.0016554 0.20392 -0.083253-0.32426 0.050106 -0.049847 0.11416 -0.13306 0.61666 0.10717 -0.08601-0.073811 -0.44645 -0.076805 0.35575 0.17372 0.41841 0.03138 -0.0617560.42202 -0.0020804 0.017583 -1.8913 -0.15642 0.94532 -0.08332 -0.3585 0.108480.18192 -0.29692 0.018156 -0.29673 0.33523 0.20154 0.093419 0.131430.062971 -0.149 -0.013108 5.63E-4 -0.053977 0.17796 -0.23668 -0.40023-0.58028 0.16608].
[0097] The word vector of the modifier of the first triple in sentence 1 [-0.15599 -0.48863 -0.0957930.33088-0.058741 0.19546 0.14079 -0.23351 -0.22091 -1.809 0.23999 0.23155 -0.2614 0.58763 0.14984 0.039441 0.26857 -0.35678 0.33978 -0.086884 -0.313310.083792 -0.45803 0.48424 -0.014717 0.53933 0.088042 0.13115 0.18257 0.1070.48577 -0.029373 0.18012 0.47554 -0.87488 0.39149 0.53745 -0.00635460.060698-0.46311 0.55727 -0.58281 -0.20869 -0.45452 -0.13888 -0.083076-0.456090.88219 0.18462 -0.84753 -0.2523 0.2111 0.037397 -0.36724 0.10139-0.110590.52339 0.13964 -0.012866 0.2447 0.24951 -0.17792 0.19481 -0.13235 -0.13260.0090331 0.11366 -0.22846 -0.55384 -0.19502 -0.69034 -0.60809 0.19883 -0.19056 0.51211 -0.11389 -0.32236 0.4768 -0.068785 0.42006 0.46125-0.257530.24404 -0.24938 -0.088638 -0.050059 0.12597 -0.41955 -0.32934-0.093084 -0.37752 -0.042846 -0.41694 0.44503 0.40834 -0.078672 -0.190770.10634 -0.454380.10417 -0.091169 -0.25406 -0.050085 -0.15111 0.19377-0.48826 -0.32771 -0.013199 -0.12172 -0.082718 0.22685 -1.1618 0.26638-0.095021 -0.051916 -0.0094577 0.17666 -0.10423 0.11075 0.31282 0.0807930.9009 -0.14988 0.0401960.087837 -0.19295 -0.17704 -0.36456 -0.10088-0.041492 0.053511 -0.583310.7997 -0.16211 -0.14938 -0.37602 -0.3355 0.40658 -0.22852 0.56702 0.45796 -0.17536 0.24725 -0.20521 0.33738 -0.20325 0.46125 -0.096619 0.35503 0.4581.1045 -0.06066 0.72095 0.26253 -0.789340.19634 -0.18822 -0.5945 0.1074 -0.21854 0.45644 0.26283 -0.12558 -0.5837-0.35181 -0.77446 -0.057786 -0.453960.021407 0.40866 -0.19257 -0.39938-1.1346 0.53859 0.2992 0.18479 -0.32065 -0.92896 -0.11041 0.43687 -0.22184 0.17882 -0.29285 -0.21025 0.019958 0.11018-0.28076 0.091363 -0.043574 0.2452 -0.12323 0.24119 0.082295 0.0633770.052041 0.67751 0.058919 0.19593 0.45511 -0.16609 0.24755 0.26625 0.164690.098158 -0.40091 -0.12506 -0.3074 -0.19394 0.1118 0.29548 -0.0029244 -0.37724 -0.50793 -0.37191 0.23170.44089 -0.25758 0.27855 0.54572 -0.14578 -0.10627 0.46546 -0.74192-0.21909 0.21883 -0.18607 0.30635 -0.27689 0.160280.15592 1.0438E-4 0.40641 -0.11154 -0.067444 -0.21263 -0.054281 0.223080.1675 -0.10388 0.21529 0.44342 0.0782 0.74798 -0.36624 -1.197 0.660830.10179 -0.27821 0.115980.17297 0.061977 0.15777 -2.5323E-4 0.10331 0.18671 -0.0088602 0.26155-0.12531 -0.28656 0.095677 -0.21804 -0.41513 0.49224 -0.18266 -0.064651-0.15015 -0.35053 0.27396 -0.17054 0.45922 -0.54717 -0.079053 0.047745-0.15922 -0.42948 -0.092585 -1.9926 0.20223 0.88295 -0.11956-0.054063-0.45556 -0.29706 -0.34774 0.10337 0.48005 -0.10413 0.26968 0.04454-0.12409-0.30056 -0.086034 -0.33568 0.018582 0.14153 0.50129 -0.24236 -0.71039-0.44195 0.032832].
[0098] …
[0099] (4) The triple similarity is finally obtained by calculating the core word similarity, modifier word similarity, and dependency similarity. The results are as follows:
[0100] The similarity matrix of each triplet of sentence 1 and each triplet of sentence 2 in the first sentence pair in the English text is [[0.0 0.057095595 0.0 0.0 0.41404375 0.0 0.28465596 0.0],[0.00.00.025545206 0.01911017 0.0 0.0 0.0 0.0],[0.0 0.07467574 0.0187382960.00.045000542 0.0 0.029802712 0.0],[0.0 0.0 0.0 0.0 0.0 0.0119297990.00.12884846],[0.3348724 0.0 0.0 0.0 0.0 0.019990483 0.0 0.025264373],[0.00.0 0.0 0.7014274 0.0 0.0 0.0 0.0 0.0],[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0],[0.54834324 0.0 0.0 0.0 0.0 0.0 0.014447474 0.0 0.029227814],[0.0 0.54834324 0.0 0.0 0.0 0.0 0.0 0.027060948 0.0],[0.0 0.0 0.030642169 0.028392496 0.00.00.0 0.0],[0.0 0.073628105 0.0 0.0 0.021248048 0.0 0.03112107 0.0],[0.00.064363725 0.0 0.0 0.33271304 0.0 0.36920875 0.0],[0.0 0.0 0.116927360.0 0.00.0 0.0 0.0],[0.030846745 0.0 0.0 0.0 0.0 0.067208506 0.00.020415977],[0.00.1587669 0.0 0.0 0.10124568 0.0 0.095587716 0.0],[0.00.0 0.12755804 0.0 0.00.0 0.0 0.0],[0.031866513 0.0 0.0 0.0 0.0 0.0 0.0 0.074076880.0 0.024619287],[0.00.122906215 0.030746583 0.0 0.031657495 0.00.03536927 0.0]]
[0101] …
[0102] (5) Based on the triple similarity, we finally get the component dependency similarity of the sentence pairs in the English text, and the results are as follows:
[0103] 0.21761236, 0.57566303, 0.7988905, 0.6234212, 0.46078095, 0.8264, 0.93661336, 0.3163639, 0.8330549, 0.2316.
[0104] Step 2: Execute the "English text vocabulary arrangement similarity check module"
[0105] The steps of the English text vocabulary arrangement similarity check module are as follows: first, read the index file, delete stop words and other processing on the sentence pairs in the text, obtain the joint word set of the sentence pairs in the text, then perform a union operation on the two joint word sets to obtain a joint word set, and obtain the vocabulary arrangement vector based on the joint word set, and finally calculate the vocabulary arrangement similarity of the sentence pairs. The analysis results of this implementation are as follows:
[0106] (1) The sentence pairs are processed by deleting stop words and other processing to obtain the joint word set of the sentence pairs in the text. The result is as follows: The joint word set of sentence 1 in text 1 is [school, student,,education,cornerstone,personal,growth,social,progress.]
[0107] The joint word set of sentence 1 in text 2 [[education, today's, society.]
[0108] …
[0109] (2) The joint word set is obtained by performing a union operation on the joint word set. The result is as follows:
[0110] The first sentence pair has the following joint words: [school, student,, education, cornerstone, personal, growth, social, progress., today's, society.]
[0111] …
[0112] (3) The vocabulary permutation vector is obtained based on the joint word set. The result is as follows:
[0113] The vocabulary permutation vector of sentence 1 in text 1 is [1,2,3,4,5,6,7,8,0,0]
[0114] The vocabulary permutation vector of sentence 1 in text 2 is [0,0,1,0,0,0,0,0,2,3]
[0115] …
[0116] (4) Through the vocabulary arrangement vector, we can finally get the vocabulary arrangement similarity, and the result is as follows:
[0117] 0.0476, 0.9286, 0.24, 0.857, 0.0, 0.0, 0.0, 0.0, 0.0482.
Claims
1. A method for checking component dependency and vocabulary arrangement similarity of English text sentences, characterized by: It includes an English text sentence component dependency similarity checking module and an English text vocabulary arrangement similarity checking module, and its checking method includes the following processing flow: (1) The processing flow of the English text sentence component dependency similarity check module is as follows: first, input the English text to be checked, perform word segmentation and sentence segmentation, delete special characters, and convert uppercase words to lowercase words on the English text; second, construct a triple of the core word, modifier word, and word dependency relationship based on the core word and modifier word in the English text sentence component dependency, as well as the dependency relationship between two words; Third, the words in the constructed triples are vectorized; Fourth, the core word similarity matrix, the modifier word similarity matrix and the word dependency similarity matrix are generated by calculating the core word similarity, the modifier word similarity and the word dependency similarity in the constructed triples; Fifth, a triple similarity matrix is generated based on the three similarity matrices. Each value in the triple similarity matrix is calculated using the triple similarity calculation formula consisting of the core word, the modifier, and the word dependency. Each row of the generated triple matrix is traversed, and the most similar triple in each row is selected to represent the final triple similarity value. Sixth, assign corresponding weight factors to word dependencies, combine sentences in English texts in pairs, obtain combinations of all sentence pairs in English texts, calculate the combinations of all sentence pairs to obtain the component dependency similarities of all sentence pairs, and construct a sentence component dependency similarity matrix of English texts. The calculation of each value of the sentence component dependency similarity matrix adopts the calculation formula of the component dependency similarity of English sentence pairs; Seventh, by traversing each row of the sentence component dependency similarity matrix, the value of the position corresponding to the most similar sentence pair is selected to represent the component dependency similarity of the final sentence pair, and the coordinates of the position are stored in the index file; (2) The processing flow of the English text vocabulary arrangement similarity check module is as follows: first, input the English text to be checked, perform word segmentation and sentence processing, delete special characters, and convert uppercase words to lowercase words on the English text; second, traverse and read the sentence index file, delete stop words from the sentence pairs in the English text, and obtain the joint word sets corresponding to the two sentences; third, perform a union operation on the joint word sets between the two sentences to obtain the joint word sets of the two sentences; Fourth, the vocabulary arrangement vector corresponding to the sentence pair is calculated according to the joint word set, and each value in the vocabulary arrangement vector is the index number of the corresponding position of the word in the joint word set; Fifth, the two vocabulary arrangement vectors are calculated separately using the vocabulary arrangement similarity calculation formula, and finally the vocabulary arrangement similarity of the English text sentence pair is calculated using the vocabulary arrangement similarity calculation formula of the English sentence pair.
2. The method for checking component dependency and vocabulary arrangement similarity of English text sentences according to claim 1 is characterized by: The calculation formula of the English text sentence component dependency similarity check module is defined as follows: (1) Similarity calculation formula for the triple consisting of core words, modifiers, and word dependencies In the calculation formula (1), n represents the distributed vectors of English essay title-theme relation triples and English essay sentence-theme relation triples from the i-th dimension to the n-th dimension in the mixed semantic vector space of the English essay hierarchical theme tree; (2) Calculation formula for semantic similarity of topic coherence between paragraph and sentence levels in English passages In formula (2), the component dependency similarity of an English sentence pair refers to the similarity of all triples in two English sentences. The components of an English sentence refer to core words, modifiers, and the word dependency relationship between core words and modifiers. m represents the number of triples in an English text sentence pair, and i represents the i-th triple in an English text sentence pair.
3. The method for checking component dependency and vocabulary arrangement similarity of English text sentences according to claim 1, characterized in that: The processing steps of the English text sentence component dependency similarity check module are as follows: P201 starts; P202 reads English texts respectively; P203 performs sentence processing on the English text, deletes special characters, and outputs the sentence processing result of the English text after preprocessing; P204 reads the sentence segmentation results of the English text after processing in step P203; P205 constructs a triple based on the core word and modifier in the text sentence, as well as the dependency relationship between two words; P206 vectorizes the core words and modifiers in the triples; P207 calculates the core word similarity and modifier word similarity matrix based on the output result of step P206, and then calculates the word dependency similarity matrix; P208, based on the output result of step P207, uses the triple similarity calculation formula (1) consisting of the core word, the modifier word and the word dependency relationship to obtain the triple similarity, thereby obtaining the triple matrix; P209 outputs the result according to step P208, traverses and selects each row of the triple matrix, and selects the most similar triple in each row to represent the final triple similarity value; P210 assigns corresponding weight factors to the word dependencies in the triple; P211 Combine sentences in two texts in pairs to obtain multiple sentence pairs; P212 According to the English sentence pair component dependency similarity calculation formula (2), the component dependency similarity of the sentence pair is obtained; P213 obtains the component dependency similarity matrix of all sentence pairs in the text according to the output result of step P212; P214 traverses each row of the component dependency similarity matrix according to the output result of step P213, selects the value of the position corresponding to the most similar sentence pair to represent the component dependency similarity of the final sentence pair, and stores the coordinates of the position in the index file; P215 stores the position coordinates corresponding to the most similar sentence pairs into the sentence index file according to the output result of step P214; P216 ends.
4. The method for checking component dependency and vocabulary arrangement similarity of English text sentences according to claim 1, characterized in that: The calculation formula of the English text sentence component dependency similarity check module is defined as follows: (3) English sentence vocabulary sorting vector calculation formula English sentence vocabulary permutation vector = [x1, x2, …, x n ] (3) In formula (3), x n The value of each dimension of the vocabulary arrangement vector in the English sentence represents the index number of the corresponding position of the word in the joint word set. The joint word set is obtained by performing a union operation on the joint word sets of two sentences. (4) English sentence pair vocabulary arrangement similarity calculation formula In formula (4), the symbol "||" represents the square root of the sum of the squares of the dimensional differences of the sentence pair vectors. The vocabulary arrangement vector of the first sentence represents the vocabulary arrangement vector of the first sentence in the English text sentence pair. The vocabulary arrangement vector of the second sentence represents the vocabulary arrangement vector of the second sentence in the English text sentence pair. The vocabulary arrangement vector is obtained by formula (3).
5. The method for checking component dependency and vocabulary arrangement similarity of English text sentences according to claim 1, characterized in that: The processing steps of the English text vocabulary arrangement similarity check module are as follows: P301 starts; P302 reads English texts respectively; P303 performs sentence processing on the English text, deletes special characters, converts uppercase words into lowercase words, and outputs the sentence processing result of the English text after preprocessing; P304 traverses and reads the sentence index file to obtain sentence pairs; P305 removes stop words from the sentence pairs in the English text to obtain the joint word set of two sentences; P306 performs a union of the two joint word sets to obtain a joint word set; P307 calculates two vocabulary arrangement vectors respectively using vocabulary arrangement similarity calculation formula (3) according to the output result of step P306; P308, based on the output result of step P307, brings the vocabulary arrangement vector into the English sentence pair vocabulary arrangement similarity calculation formula (4), and finally obtains the English text sentence pair vocabulary arrangement similarity; P309 ends.
Citation Information
Patent Citations
Sentence similarity calculation method and system
CN106021223A
Mixed multi-feature sentence similarity calculation method and system, and storage medium
CN110705612A
Sentence similarity calculation method based on coarse and fine granularity fusion
CN113033181A
Method for determining sentence similarity
US20200193217A1