The content of the invention
In view of this, the invention provides a kind of automatic method and apparatus, storage medium and terminal for reading and appraising composition, with
Solve technical problem present in prior art.
The invention discloses a kind of automatic method for reading and appraising composition, including:
A1, loaded targets composition and its corresponding compostion topic;
A2, the text subject for extracting target composition and the compostion topic topic theme;
A3, the text subject is compared with the topic theme, and according to the weighting generation point of the result of comparison
Number.
In the schematical embodiment of the present invention, the text subject for extracting target composition includes:
A21, by target composition be cut into multiple words;
A22, progress language analysis of being write a composition to the target that cutting is multiple words;
A23, the text subject for extracting according to the result of language analysis target composition;
The topic theme for extracting compostion topic includes:
A24, the compostion topic that target is write a composition is cut into multiple words;
A25, to cutting for multiple words the compostion topic carry out language analysis;
A26, the topic theme for extracting according to the result of language analysis the compostion topic.
In the schematical embodiment of the present invention, the language analysis is carried out to target composition or compostion topic
Including:
B1, the part of speech to each word in each sentence are labeled, wherein, the part of speech include noun, verb,
The combination of one or more of adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia;
B2, the name type of the noun word recognized in each sentence and mark, wherein, the name type includes people
The combination of one or more of name, place name, mechanism name;
B3, the subject to the predicate in each sentence are labeled;
Relation between b4, the word in each sentence, is labeled to the grammer of the sentence;
B5, identification participle word and part of speech between semantic association relation and mark.
In the schematical embodiment of the present invention, step a23 includes:
A231, write a composition according to target in annotation results, recognize word similarity, the word is clustered, so
The text subject that the target is write a composition once is extracted according to the result of the cluster afterwards;
The text rule that a232, basis prestore, second extraction is carried out to the text subject that target is write a composition;
The text subject that a233, basis are extracted twice, weighting obtains the final text subject of the target composition.
In the schematical embodiment of the present invention, after step a2, in addition to:
A4, the rhetorical devices of the identification target composition;
A5, generation fraction of being write a composition according to the rhetorical devices to the target, and perform step a6;
After step a3, in addition to:
A6, the step a3 fractions generated and step the a5 fraction generated is weighted, obtains the target composition most
Whole fraction.
The embodiment of the invention also discloses a kind of automatic device for reading and appraising composition, including:
Load-on module, loaded targets composition and its corresponding compostion topic;
Subject distillation module, extracts the text subject of target composition and the topic theme of the compostion topic;
Theme comparing module, the text subject is compared with the topic theme, and is added according to the result of comparison
Power generation fraction.
In the schematical embodiment of the present invention, the subject distillation module includes:
Target composition is cut into multiple words by composition word segmentation module, the composition word segmentation module;
First language analysis module, the first language analysis module is to the target of the cutting for multiple words
Composition carries out language analysis;
Text subject extraction module, the text subject extraction module extracts the target according to the result of language analysis and made
The text subject of text;
The subject distillation module also includes:
The compostion topic that target is write a composition is cut into multiple by topic word segmentation module, the topic word segmentation module
Word;
Second language analysis module, the second language analysis module is to the compostion topic of the cutting for multiple words
Carry out language analysis;
Topic subject distillation module, the topic subject distillation module extracts the theme according to the result of language analysis
Purpose topic theme.
The present invention a schematical embodiment in, the first language analysis module target is write a composition into
Row language analysis, including:
The first language analysis module is labeled to the part of speech of each word in each sentence, wherein, institute's predicate
Property include noun, verb, adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia in one
Individual or multiple combination;
The first language analysis module recognizes the name type and mark of the noun word in each sentence, wherein, institute
Stating name type includes the combination of one or more of name, place name, mechanism name;
The first language analysis module is labeled to the subject of the predicate in each sentence;
Relation between word of the first language analysis module in each sentence, is carried out to the grammer of the sentence
Mark;
The first language analysis module recognizes the semantic association relation between participle word and part of speech and marked;
The second language analysis module carries out language analysis to the compostion topic, including:
The second language analysis module is labeled to the part of speech of each word in each sentence, wherein, institute's predicate
Property include noun, verb, adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia in one
Individual or multiple combination;
The second language analysis module recognizes the name type and mark of the noun word in each sentence, wherein, institute
Stating name type includes the combination of one or more of name, place name, mechanism name;
The second language analysis module is labeled to the subject of the predicate in each sentence;
Relation between word of the second language analysis module in each sentence, is carried out to the grammer of the sentence
Mark;
The second language analysis module recognizes the semantic association relation between participle word and part of speech and marked.
In the schematical embodiment of the present invention, the text subject extraction module includes:
First subject distillation module, the first subject distillation module write a composition according to target in annotation results, recognize word
The similarity of language, is clustered to the word, the text subject then write a composition according to the result of the cluster to the target
Once extracted;
Second theme extraction module, the second theme extraction module is write a composition according to the text rule prestored to target
Text subject carries out second extraction;
Weighting block, according to the text subject extracted twice, weighting obtains the final text master of the target composition
Topic.
In the schematical embodiment of the present invention, after the subject distillation module, in addition to:
Rhetorical devices identification module, the rhetorical devices identification module recognizes the rhetorical devices of the target composition;
Rhetorical devices scoring modules, the rhetorical devices scoring modules are write a composition according to the rhetorical devices to the target
Generate fraction;
Final score generation module, the final score generation module respectively with the rhetorical devices scoring modules and
The theme comparing module connection, the fraction and the rhetorical devices scoring modules that the theme comparing module is generated is given birth to
Into fraction be weighted, obtain the target and write a composition final fraction.
The invention also discloses a kind of storage medium, be stored with computer instruction, real when the computer instruction is performed
The method for now reading and appraising composition automatically as described above.
The invention also discloses a kind of terminal, including processor and memory, be stored with calculating in the memory
Machine is instructed;In the application program launching, the processor reads the computer instruction and realized as described above automatic
The method for reading and appraising composition.
Automatic method and apparatus, storage medium and the terminal for reading and appraising composition that the present invention is provided, can be write a composition with loaded targets
And carry out language analysis automatically, extract theme so that realize it is automatic, objectively read and appraise composition, save manpower, improve effect
Rate.
Embodiment
The embodiment to the present invention is described below in conjunction with the accompanying drawings.
In order to solve the artificial technological deficiency for reading and appraising composition present in prior art, the embodiment of the invention discloses one
The automatic method for reading and appraising composition is planted, can automatically, objectively read and appraise composition, so as to save manpower, efficiency is improved.
To achieve these goals, referring to Fig. 1, the artificial method for reading and appraising composition disclosed in the embodiment of the present invention include with
Lower step a1~a3:
A1, loaded targets composition and its corresponding compostion topic.
In loading, compostion topic is loaded respectively and target composition is analyzed.It should be noted that actually making
With in scene, such as in once taking an examination, compostion topic only one of which, corresponding target composition has a lot.
A2, the text subject for extracting target composition and the compostion topic topic theme.
More at large, referring to Fig. 2, extracting the text subject of target composition includes step a21~a23:
A21, by target composition be cut into multiple words;
, wherein it is desired to explain, in Chinese, word is the semantic most basic unit of carrying.Cutting word is also this
The basis that inventive method can be realized.
For example:" I thinks that the value of life can be realized by posteriori effort by being in the bright achievement in poor and humble family.", this
The word segmentation result of technology is:" I/think/,/be in poor and humble family// bright/effort/into/just/can be with/by/day after tomorrow/carry out/reality
Existing/life// value/.If " word segmentation result be " ... be in poor and humble family// bright/achievement/can with/pass through/... " because " into
Just " it is also a common word, it is likely that such word segmentation result occur.
How to avoid ambiguity during cutting word is a problem.The present invention is with the middle school's language composition largely accumulated
Language material and corresponding composition theme material, using based on dictionary with word frequency statisticses are combined by the way of, the plan of involvement knowledge understanding
The cutting of word slightly is carried out to the article of input, to ensure the accuracy of word segmentation.
A22, progress language analysis of being write a composition to the target that cutting is multiple words.
More at large, in one embodiment of the invention, referring to Fig. 3, carrying out language analysis to target composition is
Analysis to word, and the analysis to relation between word, specifically include step b1~b5:
B1, the part of speech to each word in each sentence are labeled, wherein, the part of speech include noun, verb,
The combination of one or more of adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia;
B2, the name type of the noun word recognized in each sentence and mark, wherein, the name type includes people
The combination of one or more of name, place name, mechanism name.
For example:" beam so-and-so【Name】Birth people of brother and sister five in common people family, family, can only but lean on that poor work of father
Provide to strive to keep body and soul together.Determine to go to coke-oven plant since his primary school, in family【Mechanism name】Material is got to go home to process.He daily will
The material for carrying tens kilogram weights by that small and weak body sets out, chicken sleeps rear return home, so toward returning home and factory before crowing
Start very early in the morning and go on until late at night, year after year.But his study was never put down, famous Britain is admitted to excellent achievement【Place name】
Bristol Polytechnics【Mechanism name】.”
B3, the subject to the predicate in each sentence are labeled.
Predicate, for describing or judging the lexical item of relation between objectifiability, feature or object, such as the time, place,
Personage etc., help is provided for follow-up feature extraction.Such as "Yes" in " cat is animal " one is exactly a predicate, and
" cat " is object;" 3 " being more than " being more than in 2 " were a predicates.
Relation between b4, the word in each sentence, is labeled to the grammer of the sentence.
For example:Subject-predicate in sentence, dynamic guest, the grammatical item such as side by side are recognized, and analyzes the relation between each composition.
B5, identification participle word and part of speech between semantic association relation and mark.
By the incidence relation, the semantic information of deep layer can be directly obtained across the constraint of sentence top layer syntactic structure.
A23, the text subject for extracting according to the result of language analysis target composition.
More specifically, referring to Fig. 4, step a23 includes:
A231, write a composition according to target in annotation results, recognize word similarity, the word is clustered, so
The text subject that the target is write a composition once is extracted according to the result of the cluster afterwards;
The text rule that a232, basis prestore, second extraction is carried out to the text subject that target is write a composition;
The text subject that a233, basis are extracted twice, weighting obtains the final text subject of the target composition.
It can be seen that, the once extraction for the text subject write a composition to target is different with the dimension of second extraction:
Once extract be to target write a composition internal extraction, by composition self-information, by measure composition in word it
Between similarity, build text subject using the method for cluster, and the significance level according to different text subjects in article,
Extract keyword therein.So just the text subject of article can be found to a certain extent, and extract and text subject
Related keyword, improves coverage of the keyword to text subject.
Second extraction is the model using build up outside of writing a composition, and finds the rule in a large amount of texts (when referring to training automatically
The related language material of the substantial amounts of middle school student's composition of standby), find text subject so as to automatic, and text subject is related
Word is found out.
More at large, referring to Fig. 5, extracting the topic theme of compostion topic includes step a24~a26:
A24, the compostion topic that target is write a composition is cut into multiple words;
For the word segmentation of compostion topic, the word segmentation write a composition with target is substantially identical, just repeats no more herein.
A25, to cutting for multiple words the compostion topic carry out language analysis.
It is substantially identical with the foregoing language analysis write a composition to target for the language analysis of compostion topic, herein just no longer
Repeat.
A26, the topic theme for extracting according to the result of language analysis the compostion topic.
For the extraction of the topic theme of compostion topic, the substantive phase of extraction with the foregoing text subject write a composition to target
Together, just repeat no more herein.
Illustrate to illustrate below.
For example, a compostion topic has three students, item rainbow is diligent conscientiously, try to learn, interim, final examination achievement
Annual level is optimal.Ni guest shows typically in the study, is the activist of students' union, the walking intermediate frequency organized in students' union
Frequency is shown up, and shows talent, is elected as student leader in students' union's change-session election contest finally.Bright not good into family financial situation, he is in effort
Study, while complete every learning tasks, the time after school is used in do small business on, over a year, not only will to family
Red cent, also posts 3000 yuans subsidy family expenses to family.
So, the present embodiment can be extracted to the topic theme of the topic:Rainbow student makes great efforts, it is diligent, into good performance
It is elegant;Ni guest student is positive, talented;It is bright into student it is with family in straitened circumstances, self-reliance.
When corresponding target is write a composition, such as, for student Xiang Hong, the text subject once extracted is:Diligently (70 points),
(60 points) in good standing, student make great efforts (50 points);The text subject of second extraction is:(30 points), XXX (20 points) are made great efforts in study,
Diligently (5 points), after the result weighting extracted twice, for Xiang Hong, the standards of grading of text subject are:Student's effort (80 points),
Diligently (75 points), (60 points) in good standing.
Corresponding to the text subject of other students, extracting method is similar, and the present embodiment just will not enumerate.
A3, the text subject is compared with the topic theme, and according to the weighting generation point of the result of comparison
Number.
Above-mentioned flow terminates.
Alternatively, in scoring, it is contemplated that the rhetorical devices of composition can increase the literary grace of article, can also add pair
The discrimination of rhetorical devices, is used as the bonus point for improving literary grace of writing a composition.
So, referring to Fig. 6, after step a2, in addition to:
A4, the rhetorical devices of the identification target composition.
In the present embodiment, rhetorical devices include conventional parallelism, metaphor etc..
For example, the identification process of parallelism rhetorical devices is as follows:
A41, extraction candidate parallelism sentence.Target composition is after the pretreatment such as participle, subordinate sentence, part-of-speech tagging, from article
In release, including the parallelism such as comma, branch, fullstop, paragraph;
A42, trimness are examined.Consider from the length of parallelism and the neat degree of three parallelism short sentences.
A43, parallelism mark are examined.Parallelism mark is that have identical company in a distinguishing feature of parallelism sentence, i.e., three parallelisms sentence
Continuous character string.
A44, metaphor mark.Often along with Figures of Speech gimmick in parallelism sentence, Figures of Speech can more show student's
Composition elegance.
A5, generation fraction of being write a composition according to the rhetorical devices to the target, and perform step a6;
After step a3, in addition to:
A6, the step a3 fractions generated and step the a5 fraction generated is weighted, obtains the target composition most
Whole fraction.
The automatic method for reading and appraising composition that the present invention is provided, can be write a composition with loaded targets and carry out language analysis automatically, carry
Take theme, thus realize it is automatic, objectively read and appraise composition, save manpower, improve efficiency.
The exemplary scheme of following automatic devices for reading and appraising composition for the present embodiment.It should be noted that this is commented automatically
The technical scheme for readding the technical scheme and the above-mentioned automatic method for reading and appraising composition of the device of composition belongs to same design, comments automatically
The detail content that the technical scheme of the device of composition is not described in detail is read, the above-mentioned automatic method for reading and appraising composition is may refer to
Technical scheme description.
The embodiment of the present invention additionally provides a kind of automatic device for reading and appraising composition, referring to Fig. 7, including:
Load-on module 11, loaded targets composition and its corresponding compostion topic;
Subject distillation module 12, extracts the text subject of target composition and the topic theme of the compostion topic;
Theme comparing module 13, the text subject is compared with the topic theme, and according to the result of comparison
Weighting generation fraction.
Alternatively, in one embodiment of the invention, referring to Fig. 8, subject distillation module 12 includes:
Target composition is cut into multiple words by composition word segmentation module 121, the composition word segmentation module 121;
First language analysis module 122, the first language analysis module 122 is to institute of the cutting for multiple words
State target composition and carry out language analysis;
Text subject extraction module 123, the text subject extraction module 123 is extracted according to the result of language analysis should
The text subject of target composition;
Alternatively, in one embodiment of the invention, referring to Fig. 9, subject distillation module 12 also includes:
Topic word segmentation module 124, the compostion topic cutting that the topic word segmentation module 124 writes a composition target
Into multiple words;
Second language analysis module 125, the second language analysis module 125 is to the work of the cutting for multiple words
Literary topic carries out language analysis;
Topic subject distillation module 126, the topic subject distillation module 126 is extracted according to the result of language analysis should
The topic theme of compostion topic.
Alternatively, first language analysis module 122 carries out language analysis to target composition, including:
First language analysis module 122 is labeled to the part of speech of each word in each sentence, wherein, institute's predicate
Property include noun, verb, adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia in one
Individual or multiple combination;
First language analysis module 122 recognizes the name type and mark of the noun word in each sentence, wherein, name
Type is claimed to include the combination of one or more of name, place name, mechanism name;
First language analysis module 122 is labeled to the subject of the predicate in each sentence;
Relation between word of the first language analysis module 122 in each sentence, rower is entered to the grammer of the sentence
Note;
First language analysis module 122 recognizes the semantic association relation between participle word and part of speech and marked.
125 pairs of the second language analysis module compostion topic carries out language analysis, including:
Second language analysis module 125 is labeled to the part of speech of each word in each sentence, wherein, institute's predicate
Property include noun, verb, adjective, pronoun, number, measure word, adverbial word, preposition, conjunction, auxiliary word, interjection, onomatopoeia in one
Individual or multiple combination;
Second language analysis module 125 recognizes the name type and mark of the noun word in each sentence, wherein, institute
Stating name type includes the combination of one or more of name, place name, mechanism name;
Second language analysis module 125 is labeled to the subject of the predicate in each sentence;
Relation between word of the second language analysis module 125 in each sentence, rower is entered to the grammer of the sentence
Note;
Second language analysis module 125 recognizes the semantic association relation between participle word and part of speech and marked.
Alternatively, referring to Figure 10, text subject extraction module 123 includes:
First subject distillation module 1231, the first subject distillation module 1231 write a composition according to target in mark knot
Really, the similarity of word is recognized, the word is clustered, then the target write a composition according to the result of the cluster
Text subject once extracted;
Second theme extraction module 1232, the second theme extraction module 1232 is according to the text rule prestored, to mesh
The text subject for being denoted as text carries out second extraction;
Weighting block 1233, according to the text subject extracted twice, weighting obtains the final text of the target composition
Theme.
In addition, referring to Figure 11, after the subject distillation module 12, in addition to:
Rhetorical devices identification module 14, the rhetorical devices identification module 14 recognizes the rhetorical devices of the target composition;
Rhetorical devices scoring modules 15, the rhetorical devices scoring modules 15 are according to the rhetorical devices to the target
Composition generation fraction;
Final score generation module 16, the final score generation module 16 respectively with the rhetorical devices scoring modules
15 and the theme comparing module 13 connect, the fraction and the rhetorical devices that the theme comparing module 13 is generated
The fraction that scoring modules 15 are generated is weighted, and obtains the final fraction of the target composition.
The embodiment of the invention also discloses a kind of terminal, including processor and memory, stored in the memory
There is computer instruction;In the application program launching, the processor reads the computer instruction and realized as described above
The automatic method for reading and appraising composition.
It should be noted that the terminal can be desktop PC, notebook, palm PC and cloud server
Deng computing device.It will be appreciated by persons skilled in the art that terminal is for receiving data and export structure after being handled
Equipment.The example above is not the restriction to terminal, is that, in some occasions, terminal can also include input-output equipment, net
Network access device, bus etc..
The processor can be CPU (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) or other PLDs, discrete gate or transistor logic device
Part, discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processing
Device etc., the processor is the control centre of the terminal, utilizes various interfaces and each portion of the whole terminal of connection
Point.
The memory mainly includes storing program area and storage data field, wherein, storing program area can store operation system
Application program (such as sound-playing function, image player function etc.) needed for system, at least one function etc.;Storage data field
It can store and created data (such as voice data, phone directory etc.) etc. are used according to mobile phone.In addition, memory can be wrapped
High-speed random access memory is included, nonvolatile memory, such as hard disk, internal memory, plug-in type hard disk, intelligence can also be included
Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash
Card), at least one disk memory, flush memory device or other volatile solid-state parts.
The embodiment of the invention also discloses a kind of storage medium, be stored with computer instruction, and the computer instruction is held
The method as described above for reading and appraising composition automatically is realized during row.
The computer instruction include computer program code, the computer program code can for source code form,
Object identification code form, executable file or some intermediate forms etc..The computer-readable medium can include:It can carry
Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, the computer of the computer program code are deposited
Reservoir, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access
Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that computer-readable Jie
The content that matter is included can carry out appropriate increase and decrease according to legislation in jurisdiction and the requirement of patent practice, such as at certain
A little jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and telecommunication signal.
The preferred embodiments of the disclosure and embodiment are explained in detail above in conjunction with accompanying drawing, but this hair
It is bright to be not limited to the above-described embodiment and examples, can also be not in the knowledge that those skilled in the art possess
Made a variety of changes on the premise of departing from present inventive concept.