CN109960814A - Model parameter searching method and device - Google Patents

Model parameter searching method and device Download PDF

Info

Publication number
CN109960814A
CN109960814A CN201910227374.XA CN201910227374A CN109960814A CN 109960814 A CN109960814 A CN 109960814A CN 201910227374 A CN201910227374 A CN 201910227374A CN 109960814 A CN109960814 A CN 109960814A
Authority
CN
China
Prior art keywords
translation
model
sentence
translated
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910227374.XA
Other languages
Chinese (zh)
Other versions
CN109960814B (en
Inventor
李长亮
李小龙
唐剑波
王勇博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Kingsoft Interactive Entertainment Co Ltd
Beijing Jinshan Digital Entertainment Technology Co Ltd
Original Assignee
Chengdu Kingsoft Interactive Entertainment Co Ltd
Beijing Jinshan Digital Entertainment Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Kingsoft Interactive Entertainment Co Ltd, Beijing Jinshan Digital Entertainment Technology Co Ltd filed Critical Chengdu Kingsoft Interactive Entertainment Co Ltd
Priority to CN201910227374.XA priority Critical patent/CN109960814B/en
Publication of CN109960814A publication Critical patent/CN109960814A/en
Application granted granted Critical
Publication of CN109960814B publication Critical patent/CN109960814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The application provides model parameter searching method and device, wherein, the model parameter searching method includes: the translation probability that sentence is each translated in the respective translation and the translation for obtaining and exporting after at least two translation models translate the corpus in corpus;Based on the translation probability for each translating sentence in the translation and the translation, the corresponding weight parameter group of at least two translation model is searched in parameter space;Using the weight parameter that the target weight parameter group searched includes as the target weight parameter of at least two translation model.Model parameter searching method provided by the present application, the weight parameter of translation model is scanned in parameter space in conjunction with the translation probability after the corpus and the translated model translation of corpus in corpus, improve parameter search efficiency, and the translation accuracy rate of the translation model for the target weight parameter for obtaining application searches is higher, obtains more accurate translation result.

Description

Model parameter searching method and device
Technical field
This application involves machine translation mothod field, in particular to a kind of model parameter searching method.The application relates to simultaneously And a kind of model parameter searcher, a kind of calculating equipment and a kind of computer readable storage medium.
Background technique
Natural language processing is that the various theories for carrying out efficient communication between people and computer with natural language are realized in research And method, and with the rapid development of natural language processing, machine translation as one conditional branch of computational linguistics also by Extensive concern has been arrived, and machine translation is also known as automatic translation, is a kind of natural language (original language) to be converted to using computer The process of another natural language (object language), machine translation is one of ultimate aim of artificial intelligence, has important reality With value, promote politics, economy, in terms of play increasingly important role.
Currently, a kind of important implementation of machine translation is exactly by establishing Machine Translation Model, by will be to be translated Content input pre-establish and trained multiple Machine Translation Models, multiple translation models respectively according to different algorithms into The translation result of row translation output, the translation result of each Machine Translation Model is then evaluated by certain means, will be evaluated Best translation result translated as content to be translated after translation.But at present in the translation for determining Machine Translation Model As a result in during selection translation, loss the considerations of to Machine Translation Model is not enough, and is unable to fully reflection using not With algorithm Machine Translation Model for different content carry out translation acquisition translation result loss, finally obtained translation Accuracy rate is lower.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of model parameter searching method, to solve to exist in the prior art Technological deficiency.The embodiment of the present application provides a kind of model parameter searcher, a kind of calculating equipment and a kind of meter simultaneously Calculation machine readable storage medium storing program for executing.
The application provides a kind of model parameter searching method, comprising:
Obtain the respective translation exported after at least two translation models translate the corpus in corpus, Yi Jisuo State the translation probability that sentence is each translated in translation;
Based on the translation probability for each translating sentence in the translation and the translation, described at least two are searched in parameter space The corresponding weight parameter group of a translation model;
Using the weight parameter that the target weight parameter group searched includes as at least two translation model Target weight parameter.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group of at least two translation model of Suo Suoshu, comprising:
Search tree is constructed based on the translation probability for each translating sentence in the translation and the translation;In the parameter space Search node in weight parameter group and described search tree corresponds;
The corresponding weight parameter of at least two translation model is searched in the parameter space according to described search tree Group.
Optionally, described that search tree sub-step is constructed based on the translation probability for each translating sentence in the translation and the translation In implementation procedure, the search node in described search tree is corresponded to for the weight parameter group in the parameter space, is executed as follows Operation:
According to the weight parameter group in the corresponding parameter space of described search node, using the weight parameter group as The weight parameter of at least two translation model, and described search is calculated in conjunction with the translation probability for each translating sentence in the translation The inspiration cost of node;
Wherein, the inspiration cost of described search node is according to the mould of each translation model at least two translation model Type inspires cost to calculate and obtains, and the model of each translation model inspires the weight parameter and the translation that cost is the translation model In each translate sentence translation probability the sum of products.
Optionally, in described search tree any one search node lower layer's search node, determine in the following way:
It determines adjacent with described search node in described search tree using Gauss algorithm and there is the adjacent of connection relationship to search The search node set of socket point;
According to the inspiration cost for calculating each adjacency search node in the described search node set obtained, in described search The lower layer's search section for inspiring at least one highest adjacency search node of cost as described search node is selected in node set Point.
Optionally, described to determine adjacent with described search node in described search tree using Gauss algorithm and there is connection to close After the search node collection substep of the adjacency search node of system executes, and it is described according to the described search node for calculating acquisition The inspiration cost of each adjacency search node in set, selection inspires cost highest at least one in described search node set Before a adjacency search node is executed as lower layer's search node sub-step of described search node, comprising:
For the search node in described search node set, according in the corresponding parameter space of described search node Weight parameter group, using the weight parameter group as the weight parameter of at least two translation model;
Using the weight parameter of at least two translation model as foundation, turned over using reordering to described at least two It translates the textual translation that model respectively exports to be merged, obtains the referenced text translation of the text to be translated;
The referenced text translation is compared with the true translation of the corpus, determines the referenced text translation phase Translation accuracy rate and/or translation loss for the true translation;
Judge whether the translation accuracy rate and/or the translation loss are greater than the upper layer search node of described search node Corresponding translation accuracy rate and/or translation loss;
If being not more than, described search node is rejected from the search node set belonging to it.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group step of at least two translation model of Suo Suoshu is realized based on beam search algorithm.
Optionally, the weight parameter that the target weight parameter group that will be searched includes is as described at least two After the target weight parameter step of translation model executes, comprising:
Text to be translated is inputted at least two translation model respectively and carries out text translation, output is for described respectively The textual translation of text to be translated;
Using reordering, the textual translation respectively exported at least two translation model is merged, obtain it is described to The optimal textual translation of cypher text.
Optionally, the textual translation that each translation model exports at least two translation model is by least one text Sentence composition is translated, and the sentence of translating in the textual translation respectively corresponds sentence to be translated in the text to be translated.
Optionally, described to be melted using the textual translation respectively exported at least two translation model that reorders It closes, obtains the optimal textual translation of the text to be translated, comprising:
For each of the text to be translated sentence to be translated, according to the target weight of at least two translation model Parameter is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence;The text translates sentence collection by described wait turn over It translates sentence corresponding at least two text in the textual translation that at least two translation model exports and translates sentence composition;
Sentence is translated according to the corresponding optimal texts of sentence to be translated all in the text to be translated, by the text to be translated All corresponding optimal texts of sentence to be translated translate sentence and are fused into the optimal textual translation in this.
Optionally, described for each of the text to be translated sentence to be translated, according at least two translations mould The target weight parameter of type is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence, comprising:
It is respectively defeated according to the target weight parameter of at least two translation model and at least two translation model The translation probability of each sentence to be translated in the text to be translated out calculates the corresponding text of the sentence to be translated and translates sentence concentration Each text translates the translation evaluation score of sentence;
Translating sentence in the corresponding text of the sentence to be translated concentrates the highest text of selected text translation evaluation score to translate sentence as institute The optimal text for stating sentence to be translated translates sentence.
The application also provides a kind of model parameter searcher, comprising:
Corpus translation module is configured as obtaining defeated after at least two translation models translate the corpus in corpus The translation probability of sentence is each translated in respective translation and the translation out;
Weight parameter group searching module is configured as general based on the translation for each translating sentence in the translation and the translation Rate searches for the corresponding weight parameter group of at least two translation model in parameter space;
Target weight parameter determination module, the weight parameter that the target weight parameter group for being configured as to search includes point Target weight parameter not as at least two translation model.
Optionally, the weight parameter group searching module, comprising:
Search tree constructs submodule, is configured as based on the translation probability structure for each translating sentence in the translation and the translation Build search tree;The search node in weight parameter group and described search tree in the parameter space corresponds;
Submodule is searched for, is configured as searching at least two translation in the parameter space according to described search tree The corresponding weight parameter group of model.
Optionally, the model parameter searcher, comprising:
Translation translation module is configured as inputting text to be translated into at least two translation models progress text respectively Translation, output is directed to the textual translation of the text to be translated respectively;
Translation Fusion Module is configured as translating using the text for respectively exporting at least two translation model that reorders Text is merged, and the optimal textual translation of the text to be translated is obtained.
The application also provides a kind of calculating equipment, comprising:
Memory and processor;
The memory executes the computer executable instructions for storing computer executable instructions, the processor Described in Shi Shixian the step of model parameter searching method.
The application also provides a kind of computer readable storage medium, is stored with computer instruction, and the instruction is by processor The step of model parameter searching method is realized when execution.
Compared with prior art, the application has the advantages that
The application provides a kind of model parameter searching method, comprising: obtains at least two translation models in corpus The translation probability of sentence is each translated in the respective translation and the translation that corpus exports after being translated;Based on the translation With the translation probability for each translating sentence in the translation, the corresponding weight of at least two translation model is searched in parameter space Parameter group;Using the weight parameter that the target weight parameter group searched includes as the mesh of at least two translation model Mark weight parameter.
Model parameter searching method provided by the present application executes needed for translation duties in parameter space search translation model During target weight parameter, by combine corpus in corpus and the translated model translation of corpus after translation probability, The search that the weight parameter of at least two translation models is carried out in parameter space improves search efficiency, and obtains in search At least two translation model respectively execute translation duties needed on the basis of target weight parameter, make using the mesh Translation accuracy rate during the translation model execution translation duties of mark weight parameter is higher, obtains more accurate translation result.
Detailed description of the invention
Fig. 1 is a kind of model parameter searching method process flow diagram provided by the embodiments of the present application;
Fig. 2 is a kind of schematic diagram of search tree provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of model parameter searcher provided by the embodiments of the present application;
Fig. 4 is a kind of structural block diagram for calculating equipment provided by the embodiments of the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments, It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... " or " in response to determination ".
The application provides a kind of model parameter searching method, and the application also provides a kind of model parameter searcher, a kind of Calculate equipment and a kind of computer readable storage medium.Below in conjunction with embodiment provided by the present application attached drawing one by one It is described in detail, and each step of method is illustrated.
A kind of model parameter searching method embodiment provided by the present application is as follows:
Referring to attached drawing 1, it illustrates a kind of model parameter searching method process flow diagrams provided in this embodiment, referring to attached Fig. 2, it illustrates a kind of schematic diagrames of search tree provided in this embodiment.
Step S102 obtains respective translating of exporting after at least two translation models translate the corpus in corpus The translation probability of sentence is each translated in text and the translation.
In machine translation task, accuracy rate is translated to be promoted, is often turned over using multiple (two or more) It translates model and treats cypher text and translated, then selected most in translation result of multiple translation models for text to be translated Good translation result is exported as the translation of text to be translated.However, in practical applications, multiple translation models may be using not With translation architecture perhaps translation algorithm and different translation architecture or translation algorithm carry out in translation process to text, needle The translation effect performance translated to different types of text may be also different, from this starting point, further to mention Rise translation accuracy rate, the translation result of different translation models can be merged, for example, include for text to be translated sentence (to Translate sentence) it is unit, it selects in the translation result of different translation models and is turned over for each sentence to be translated in text to be translated Translate effect it is best translate sentence, the sentence of translating for then treating all sentences to be translated in cypher text is merged, after fusion i.e. obtain pair Text to be translated translates more accurate translation.
When it is implemented, need to be directed to multiple during the translation of sentence to be translated is merged in treating cypher text Corresponding weight parameter is respectively set in translation model, is directed on the basis of the weight parameter of translation model to each translation model In text to be translated each sentence to be translated translation effect carry out quantitatively evaluating, thus select in text to be translated each to Translation sentence translation effect it is best translate sentence, finally the translation effect for each of selecting sentence to be translated it is best on the basis of translating sentence It is merged, to obtain more accurate translation result.
It should be noted that during multiple translation model respectively weight parameters are set, the setting nothing of weight parameter Precedent can follow, therefore can not determine the specific value or value range of weight parameter, it may be assumed that the value range of weight parameter is that do not have Conditional, the parameter space of weight parameter tends to be infinite, therefore, how in infinite parameter space to determine multiple translations The respective optimal weight parameter of model, or determine multiple translation models close to optimal weight parameter target weight parameter, The most disaster during fusion obtains more accurate translation result is carried out as the above-mentioned translation result to multiple translation models Topic.
Model parameter searching method provided by the present application, during multiple translation model respectively weight parameters are set, On the basis of the translation result translated in conjunction with multiple translation models to corpus in corpus, with reference to multiple translation models pair The translation effect of corpus in corpus searches for the weight parameter of multiple translation models in the infinite parameter space of value, and Make the weight parameter searched out after being applied to corresponding translation model, the weight parameter in the translation model searched out can be made On the basis of carry out translation model translation result merged after the accuracy of translation that obtains it is higher.
When it is implemented, by the way that corpus in the corpus to be inputted to each translation mould in multiple translation models respectively Type can export respectively after each translation model translation for the translation of corpus in the corpus.Specifically, in the corpus Each corpus have in the translation that obtains after the translation of each translation model it is corresponding translate sentence, after each translation model translation The each corpus both sides translated in sentence and the corpus in the translation of acquisition have corresponding relationship.
It should be noted that each translation model to corpus carry out translation output phase answer translation during, each turn over Translate model can also output phase answer the translation probability that sentence is each translated in translation.The translation that sentence is each translated described in the embodiment of the present application is general Rate can be the numerical value that characterization translation model translates the translation accuracy of sentence for this, be also possible to other characterization translation model needles The relevant numerical value of translation accuracy of sentence is translated this, for example characterization translation model translates this numerical value of translation loss of sentence, to this Without limitation.
For example, 4000 corpus to be translated in corpus are inputted 3 translation models: translation model Model respectively 1, translation model Model 2 and translation model Model 3;
Wherein, 1 pair of translation model Model input 4000 corpus to be translated translate after, output 4000 to The corpus of translation corresponding translation t1, translation t1 also include 4000 and translate sentence, this 4000 are translated sentence respectively and in corpus 4000 corpus to be translated correspond;Meanwhile 4000 corpus to be translated of 1 pair of translation model Model input carry out After translation, it can also export in translation t1 4000 and translate the respective translation probability marking of sentence;
Similar, after 4000 corpus to be translated of 2 pairs of translation model Model inputs are translated, export 4000 Corpus to be translated corresponding translation t2, translation t2 also include 4000 and translate sentence, this 4000 are translated sentence respectively and in corpus 4000 corpus to be translated correspond;Meanwhile 4000 corpus to be translated of 2 pairs of translation model Model inputs carry out After translation, it can also export in translation t2 4000 and translate the respective translation probability marking of sentence;
After 4000 corpus to be translated of 3 pairs of translation model Model inputs are translated, output 4000 is to be translated Corpus corresponding translation t3, translation t3 also include 4000 and translate sentence, this 4000 translate sentence respectively with 4000 in corpus Corpus to be translated corresponds;Meanwhile 4000 corpus to be translated of 3 pairs of translation model Model inputs are translated Afterwards, 4000 can also be exported in translation t3 and translate the respective translation probability marking of sentence.
Step S104 is searched in parameter space based on the translation probability for each translating sentence in the translation and the translation The corresponding weight parameter group of at least two translation model.
The above-mentioned corpus got in the corpus, which exports, to be exported after at least two translation model is translated After the translation probability for each translating sentence in respective translation and the translation, according to the translation and the translation got In each translate the translation probability of sentence, the weight parameter of at least two translation model is searched in same parameters space;
In the embodiment of the present application, the weight parameter in the parameter space exists in the form of weight parameter group, Mei Gequan The number for the weight parameter for including in weight parameter group is consistent with the number of translation model at least two translation model, thus The weight parameter group finally searched in the parameter search space is set to be applied at least two translation model.
In the embodiment of the present application, based on the translation probability for each translating sentence in the translation and the translation, in the parameter The corresponding weight parameter group of at least two translation model is searched in space, it is preferred to use as under type is realized:
1) search tree is constructed based on the translation probability for each translating sentence in the translation and the translation, in the parameter space Weight parameter group and described search tree in search node one-to-one correspondence.
When it is implemented, during constructing described search tree, for the weight parameter group pair in the parameter space The each search node answered will be described preferably according to the weight parameter group in the corresponding parameter space of described search node Weight parameter of the weight parameter group as at least two translation model, and it is general in conjunction with the translation for each translating sentence in the translation The inspiration cost of rate calculating described search node;Wherein, the inspiration cost of described search node is according at least two translation The model of each translation model inspires cost to calculate and obtains in model, and it is the translation mould that the model of each translation model, which inspires cost, The sum of products of the translation probability of sentence is each translated in the weight parameter of type and the translation.
Further, during constructing described search tree, the lower layer of any one search node is searched in described search tree Socket point, determines in the following way:
A) it is determined using Gauss algorithm adjacent with described search node in described search tree and adjacent with connection relationship The search node set of search node;
B) it according to the inspiration cost for calculating each adjacency search node in the described search node set obtained, is searched described It selects that at least one highest adjacency search node of cost is inspired to search for as the lower layer of described search node in socket point set Node.
Further, adjacency search adjacent with described search node in determining described search tree and with connection relationship After the search node set of node, and selection inspires cost highest at least one is adjacent in described search node set It, can also be to described further to promote search efficiency before search node is as lower layer's search node of described search node Search node in search node set is filtered, and searching in described search node set is reduced by way of rejecting Interstitial content is lifted on the basis of described search node set and selects this process of lower layer's search node of described search node Treatment effeciency, thus to promote search efficiency.
For example, attached search tree shown in Fig. 2, to search for translation model in parameter space using beam search algorithm The search tree of Model 1, translation model Model 2 weight parameter group corresponding with 3 three of translation model Model, parameter space In each weight parameter group and the search node in search tree there is corresponding relationship, the specific building process of search tree is as follows:
During constructing search tree, it is necessary first to determine that an initiating searches node, initiating searches node can be used Random algorithm determines at random, or specifies specific search node for initiating searches node before search;
After determining initiating searches node, from initiating searches node, determine that lower layer of initiating searches node is searched The collection beam width (Beam Width) of socket point, next layer of interstitial content and beam search algorithm unanimously, collects beam width herein It is set as 2;Specifically during next layer of initiating searches node of search node, the first step calculates all search sections of next layer The inspiration cost of point, second step arrange all search nodes of next layer according to the collating sequence of inspiration cost from high in the end Sequence, third step are selected to inspire highest 2 search nodes of cost in all search nodes of next layer after sequence, as be originated Lower layer's search node of search node, referring to attached search node Top1 shown in Fig. 2 and search node Top2;
Wherein, the inspiration cost of search node Top1 is translation model Model 1, translation model Model 2 and translation mould The respective model of 3 three of type Model inspires the sum of cost;
Specifically, by weight parameter of the translation model Model 1 in the corresponding weight parameter group of search node Top1 with It translates sentence respective translation probability marking in above-mentioned translation t1 and is multiplied respectively for 4000, and sum to 4000 products, as translate The model of model M odel 1 inspires cost h1;Similar, by translation model Model 2 in the corresponding weight of search node Top1 Weight parameter in parameter group translates the respective translation probability marking of sentence with 4000 in above-mentioned translation t2 and is multiplied respectively, and to 4000 A product summation, the model of as translation model Model 2 inspire cost h2;By translation model Model 3 in search node The respective translation probability marking point of sentence is translated for 4000 in weight parameter and above-mentioned translation t3 in the corresponding weight parameter group of Top1 It is not multiplied, and sums to 4000 products, the model of as translation model Model 3 inspires cost h3;
Also, the model of cost h1, translation model Model 2 is inspired to inspire cost on the model of translation model Model 1 The model of h2 and translation model Model 3 inspire cost h3 to sum, the inspiration cost H1 of as search node Top1;Class As, the inspiration cost of other search nodes is equally calculated using above-mentioned inspiration cost calculation and is obtained in search tree, herein No longer repeat one by one;
Further, for next layer of the search node Top1 and search node Top2 of initiating searches node, with above-mentioned The processing of beginning search node is similar, respectively determine lower layer of search node Top1 2 search nodes: search node Top11 and Search node Top12;And lower layer of search node Top2 of 2 search nodes: search node Top21 and search node Top22;
The rest may be inferred, determines subsequent each layer of 4 search nodes, constructs search tree based on determining search node.
In addition, in practical applications, described search tree can also be constructed using breadth-first strategy, wherein in determination In described search tree during search node, the search in described search tree can also be determined using heuristic search algorithm Node, the purpose using heuristic search algorithm is the selectable search node for saving and capable of reaching destination node, specific logical The inspiration cost that each search node is calculated using heuristic search algorithm is crossed, the inspiration cost refers to from current search node To the loss of target search node, then according to inspiring cost to be ranked up each layer of search node, finally in each layer The search node for leaving the preset number for inspiring cost optimal, only carries out the depth of next level in the search node that each layer leaves Degree search, other search nodes not being left of each layer are then removed.
In a kind of preferred embodiment provided by the embodiments of the present application, to the search node in described search node set into Row filtering, is specifically realized in the following way:
A) for the search node in described search node set, according to the corresponding parameter space of described search node In weight parameter group, using the weight parameter group as the weight parameter of at least two translation model;
B) using the weight parameter of at least two translation model as foundation, using reordering to described at least two The textual translation that translation model respectively exports is merged, and the referenced text translation of the text to be translated is obtained;
C) the referenced text translation is compared with the true translation of the corpus, determines the referenced text translation Translation accuracy rate and/or translation loss relative to the true translation;
The translation accuracy rate refers to accuracy rate of the referenced text translation relative to the true translation, such as logical Crossing similarity algorithm and calculating the referenced text translation and true translation text similarity between the two is 89%, then institute It is 89% that referenced text translation, which is stated, relative to the translation accuracy rate of the true translation.
The translation loss, refers to the loss gap between the referenced text translation and the true translation, such as logical Crossing loss function and calculating the referenced text translation relative to the loss of the true translation is 0.11, then the referenced text is translated Text is 0.11 relative to the translation loss of the true translation.
D) judge whether the translation accuracy rate and/or the translation loss are greater than the upper layer search section of described search node The corresponding translation accuracy rate of point and/or translation loss;
If more than then showing that the search node is promoted compared to the translation accuracy of upper layer search node, it is contemplated that needle The search of more plus depth is carried out to the search node, therefore retains the search node in described search node set;
If being not more than, shows that translation accuracy of the search node compared to upper layer search node is not promoted, no longer need to The search that more plus depth is carried out for the search node, described search node is rejected from the search node set belonging to it.
2) the corresponding weight ginseng of at least two translation model is searched in the parameter space according to described search tree Array.
It uses the example above, after having constructed search tree, is scanned for according to the sequence of the search node in search tree, specifically In search process, the number of plies of search tree can be preassigned, then in the last layer (search node TopN1, search node TopN2, search node TopN3, the corresponding n-th layer of search node TopN4) 4 search nodes in, select inspire cost highest A search node (i.e. search node TopN1) as parameter space carry out weight parameter search target search node, 3 weight parameters for including in the corresponding weight parameter group of search node TopN1, the translation as to be searched in parameter space This respective target weight parameter of 3 translation models of model M odel 1, translation model Model 2 and translation model Model 3.
In practical application, searched in the parameter space the corresponding weight parameter group of at least two translation model this One search process can realize using corresponding searching algorithm, for example, using greedy algorithm (Greedy Algorithm) or Person's beam search algorithm (Beam Search Algorithm) searches out at least two translations mould in the parameter space The corresponding weight parameter group of type.
As described above, tending to for the parameter space is infinite, in the embodiment of the present application, it is contemplated that the parameter space Tend to be infinite, using random sampling and based on greedy algorithm scanned in the parameter space when, be easily trapped into Locally optimal solution, search efficiency are very low;To be lifted in the parameter space, to search at least two translation model corresponding The search efficiency of this search process of weight parameter group, it is preferred to use beam search algorithm, according to the characteristic of beam search algorithm, Some quality poor search node is rejected during each step deep search, retains the higher search of some quality Node, thus to improve search efficiency.
Step S106, the weight parameter for including using the target weight parameter group searched are turned over as described at least two Translate the target weight parameter of model.
It is above-mentioned the corresponding target weight parameter group of target search node is searched out in the parameter space after, will be described The weight parameter that target component group includes is respectively as the respective target weight parameter of at least two translation model.For example, 3 weight parameters for including by the above-mentioned corresponding weight parameter group of target search node TopN1 searched in parameter space, It is separately in this 3 translation models of translation model Model 1, translation model Model 2 and translation model Model 3, makees For the respective target weight parameter of three.
In practical application, the translation model is applicable to actual translations task after determining target weight parameter In, the text translated in actual translations task is translated, to make translation model in target weight parameter On the basis of realize and more accurately translate, in a kind of preferred embodiment provided by the embodiments of the present application, the above-mentioned institute searched It states the weight parameter that target weight parameter group includes and is separately at least two translation model, as described at least two After the target weight parameter of translation model, text is carried out by the way that text to be translated is inputted at least two translation model respectively This translation, output is directed to the textual translation of the text to be translated respectively, and translates mould to described at least two using reordering The textual translation that type respectively exports is merged, and the optimal textual translation of the text to be translated is obtained.Preferably, it is described at least The textual translation of each translation model output is translated sentence by least one text and is formed in two translation models, and the textual translation In sentence of translating respectively correspond sentence to be translated in the text to be translated.As it can be seen that extremely as unit of sentence in above-mentioned translation process The translation result of few two translation models is merged, and the accuracy of the translation result finally obtained is higher.
Specifically, above-mentioned merged using the textual translation respectively exported at least two translation model that reorders During, it is preferred to use the textual translation that under type exports each translation model merged with obtain as described in optimal text This translation:
1) it for each of the text to be translated sentence to be translated, is weighed according to the target of at least two translation model Weight parameter is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence, the text translate sentence collection by it is described to Translation sentence corresponding at least two text in the textual translation that at least two translation model exports translates sentence composition.
Wherein, the optimal text is translated sentence and is preferably determined in the following way:
A) respectively according to the target weight parameter of at least two translation model and at least two translation model The translation probability of each sentence to be translated in the text to be translated of output calculates the corresponding text of the sentence to be translated and translates sentence collection In each text translate the translation evaluation score of sentence;
B) translating sentence in the corresponding text of the sentence to be translated concentrates the highest text of selected text translation evaluation score to translate a conduct The optimal text of the sentence to be translated translates sentence.
2) sentence is translated according to the corresponding optimal texts of sentence to be translated all in the text to be translated, it will be described to be translated All corresponding optimal texts of sentence to be translated translate sentence and are fused into the optimal textual translation in text.
For example, text to be translated is an article text of 10 Chinese compositions, target is by the article of current Chinese Text is translated as English;
Firstly, this article text is inputted translation model Model 1, translation model Model 2 and translation model respectively This 3 translation models of Model 3 are translated, and the output of translation model Model 1 translates the English that sentence forms by 10 English after translation Literary translation text1 and this 10 English translate the translation probability that each English of sentence translates sentence, and in English translation text1 10 English translate sentence and respectively correspond 10 Chinese in Chinese articles text;Translation model Model 2 and translation model Model 3 Similar with translation model Model 1, the output of translation model Model 2 translates the English translation text2 that sentence forms by 10 English, with And this 10 English translate the translation probability that each English of sentence translates sentence;The output of translation model Model 3 translates a group by 10 English At English translation text3 and this 10 English translate the translation probability that each English of sentence translates sentence;
As it can be seen that each Chinese in Chinese articles text, respectively correspond English translation text1, English translation text2 and An English translation in English translation text3, it may be assumed that each Chinese is respectively corresponded to be translated by the English that 3 English translations form Sentence collection;
Secondly, determining that each Chinese optimal English translates sentence in 10 Chinese in Chinese articles text, determine every The method that one Chinese optimal English translates sentence is identical, by taking any one Chinese in Chinese articles text as an example, this Chinese Corresponding English, which translates sentence collection and translates sentence by 3 English, to be formed: sentence1, sentence2 and sentence3, wherein Sentence1 is that the English exported after translation model Model 1 is translated for this Chinese translates sentence, and sentence2 is to turn over It translates the English exported after model M odel 2 is translated for this Chinese and translates sentence, sentence3 is translation model Model 3 The English exported after being translated for this Chinese translates sentence;
Based on this, calculates English and translate sentence collection Chinese and English and translate the translation of sentence1, sentence2 and sentence3 and comment Valence score, English translate the weight parameter of the translation evaluation score of a sentence1 equal to translation model Model 1 and The product p1 of the translation probability of sentence1, the translation evaluation score that English translates a sentence2 are equal to translation model Model The product p2 of the translation probability of 2 weight parameter and sentence2, the translation evaluation score that English translates a sentence3 are equal to The product p3 of the translation probability of the weight parameter and sentence3 of translation model Model 3;Compare the big of p1, p2 and p3 three It is small, if p3 is maximum, the corresponding English of p3 is translated into the sentence3 optimal English Chinese as this and translates sentence;Phase therewith It is similar, determine that the respective optimal English of 10 Chinese in Chinese articles text translates sentence respectively;
Finally, on the basis of determining that 10 in Chinese articles text respective optimal English of Chinese translate sentence, according to 10 The optimal English of sentence translates the corresponding Chinese statement sequence in Chinese articles text of sentence, this 10 optimal English are successively translated sentence combination Get up, finally formed english article is the English translation of Chinese articles text.
In conclusion model parameter searching method provided by the present application, executes translation in parameter space search translation model During the target weight parameter of required by task, after combining the corpus and the translated model translation of corpus in corpus Translation probability carries out the search of the weight parameter of at least two translation models in parameter space, improves search efficiency, and On the basis of target weight parameter needed at least two translation model that search obtains respectively executes translation duties, make to answer It is higher with the translation accuracy rate during the translation model execution translation duties of the target weight parameter, more accurately turned over Translate result.
A kind of model parameter searcher embodiment provided by the present application is as follows:
In the above-described embodiment, a kind of model parameter searching method is provided, corresponding, the application also provides A kind of model parameter searcher, is illustrated with reference to the accompanying drawing.
Referring to attached drawing 3, it illustrates a kind of schematic diagrames of model parameter searcher embodiment provided by the present application.
Since Installation practice is substantially similar to embodiment of the method, so describing fairly simple, relevant part please join The corresponding explanation of the embodiment of the method for above-mentioned offer is provided.Installation practice described below is only schematical.
The application provides a kind of model parameter searcher, comprising:
Corpus translation module 302 is configured as at least two translation models of acquisition and translates to the corpus in corpus The translation probability of sentence is each translated in the respective translation and the translation exported afterwards;
Weight parameter group searching module 304 is configured as based on the translation for each translating sentence in the translation and the translation Probability searches for the corresponding weight parameter group of at least two translation model in parameter space;
Target weight parameter determination module 306, the weight ginseng that the target weight parameter group for being configured as to search includes Target weight parameter of the number respectively as at least two translation model.
Optionally, the weight parameter group searching module 304, comprising:
Search tree constructs submodule, is configured as based on the translation probability structure for each translating sentence in the translation and the translation Build search tree;The search node in weight parameter group and described search tree in the parameter space corresponds;
Submodule is searched for, is configured as searching at least two translation in the parameter space according to described search tree The corresponding weight parameter group of model.
Optionally, in described search tree building submodule operational process, for the weight parameter group in the parameter space Search node in corresponding described search tree, according to the weight parameter group in the corresponding parameter space of described search node, Using the weight parameter group as the weight parameter of at least two translation model, and in conjunction with each translating sentence in the translation The inspiration cost of translation probability calculating described search node;
Wherein, the inspiration cost of described search node is according to the mould of each translation model at least two translation model Type inspires cost to calculate and obtains, and the model of each translation model inspires the weight parameter and the translation that cost is the translation model In each translate sentence translation probability the sum of products.
Optionally, in described search tree any one search node lower layer's search node, it is true by running following units It is fixed:
Search node set determination unit is configured as being determined using Gauss algorithm in described search tree and described search section Point is adjacent and has the search node set of the adjacency search node of connection relationship;
Lower layer's search node determination unit is configured as each adjacent in the described search node set obtained according to calculating The inspiration cost of search node, selection inspires at least one highest adjacency search node of cost in described search node set Lower layer's search node as described search node.
Optionally, in described search tree any one search node lower layer's search node, also by running following units It determines:
Weight parameter determination unit is configured as being searched for the search node in described search node set according to described Weight parameter group in the corresponding parameter space of socket point, using the weight parameter group as at least two translations mould The weight parameter of type;
Referenced text translation determination unit, be configured as with the weight parameter of at least two translation model be according to According to using reordering, the textual translation respectively exported at least two translation model is merged, and is obtained described to be translated The referenced text translation of text;
Textual translation comparing unit is configured as comparing the true translation of the referenced text translation and the corpus It is right, determine the referenced text translation relative to the translation accuracy rate of the true translation and/or translation loss;
Judging unit is configured as judging whether the translation accuracy rate and/or translation loss are greater than described search The corresponding translation accuracy rate of the upper layer search node of node and/or translation loss;
If being not more than, described search node is rejected from the search node set belonging to it.
Optionally, the weight parameter group searching module 304 is realized based on beam search algorithm.
Optionally, the model parameter searcher, comprising:
Translation translation module is configured as inputting text to be translated into at least two translation models progress text respectively Translation, output is directed to the textual translation of the text to be translated respectively;
Translation Fusion Module is configured as translating using the text for respectively exporting at least two translation model that reorders Text is merged, and the optimal textual translation of the text to be translated is obtained.
Optionally, the textual translation that each translation model exports at least two translation model is by least one text Sentence composition is translated, and the sentence of translating in the textual translation respectively corresponds sentence to be translated in the text to be translated.
Optionally, the translation Fusion Module, comprising:
Optimal text translates a selecting unit, is configured as being directed to each of the text to be translated sentence to be translated, according to The target weight parameter of at least two translation model is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text Originally sentence is translated;It is corresponding in the textual translation that at least two translation model exports by the sentence to be translated that the text translates sentence collection At least two texts translate sentence composition;
Optimal text translates an integrated unit, is configured as respectively being corresponded to according to sentences to be translated all in the text to be translated Optimal text translate sentence, by the corresponding optimal texts of sentence to be translated all in the text to be translated translate sentence be fused into it is described Optimal textual translation.
Optionally, the optimal text translates a selecting unit, comprising:
Evaluation score computation subunit is translated, is configured as being joined according to the target weight of at least two translation model The translation probability of each sentence to be translated in the text to be translated that several and described at least two translation model respectively exports, It calculates the corresponding text of the sentence to be translated and translates the translation evaluation score that sentence concentrates each text to translate sentence;
Optimal text translates sentence selection subelement, is configured as translating sentence in the corresponding text of the sentence to be translated and selection is concentrated to turn over It translates the highest text of evaluation score and translates sentence as the optimal text of the sentence to be translated and translate sentence.
A kind of calculating apparatus embodiments provided by the present application are as follows:
Fig. 4 is to show the structural block diagram of the calculating equipment 400 according to one embodiment of this specification.The calculating equipment 400 Component include but is not limited to memory 410 and processor 420.Processor 420 is connected with memory 410 by bus 430, Database 450 is for saving data.
Calculating equipment 400 further includes access device 440, access device 440 enable calculate equipment 400 via one or Multiple networks 460 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network (WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 440 may include wired or wireless One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 4 of equipment 400 are calculated Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in Fig. 4 merely for the sake of Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it His component.
Calculating equipment 400 can be any kind of static or mobile computing device, including mobile computer or mobile meter Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 400 can also be mobile or state type Server.
The application provides a kind of calculating equipment, including memory 410 and processor 420;
For storing computer executable instructions, the processor 420 executes the computer and can hold the memory 410 It is realized when row instruction:
Obtain the respective translation exported after at least two translation models translate the corpus in corpus, Yi Jisuo State the translation probability that sentence is each translated in translation;
Based on the translation probability for each translating sentence in the translation and the translation, described at least two are searched in parameter space The corresponding weight parameter group of a translation model;
Using the weight parameter that the target weight parameter group searched includes as at least two translation model Target weight parameter.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group of at least two translation model of Suo Suoshu, comprising:
Search tree is constructed based on the translation probability for each translating sentence in the translation and the translation;In the parameter space Search node in weight parameter group and described search tree corresponds;
The corresponding weight parameter of at least two translation model is searched in the parameter space according to described search tree Group.
Optionally, described to be held based on the translation probability building search tree instruction for each translating sentence in the translation and the translation During row, the search node in described search tree is corresponded to for the weight parameter group in the parameter space, executes following behaviour Make:
According to the weight parameter group in the corresponding parameter space of described search node, using the weight parameter group as The weight parameter of at least two translation model, and described search is calculated in conjunction with the translation probability for each translating sentence in the translation The inspiration cost of node;
Wherein, the inspiration cost of described search node is according to the mould of each translation model at least two translation model Type inspires cost to calculate and obtains, and the model of each translation model inspires the weight parameter and the translation that cost is the translation model In each translate sentence translation probability the sum of products.
Optionally, in described search tree any one search node lower layer's search node, determine in the following way:
It determines adjacent with described search node in described search tree using Gauss algorithm and there is the adjacent of connection relationship to search The search node set of socket point;
According to the inspiration cost for calculating each adjacency search node in the described search node set obtained, in described search The lower layer's search section for inspiring at least one highest adjacency search node of cost as described search node is selected in node set Point.
Optionally, described to determine adjacent with described search node in described search tree using Gauss algorithm and there is connection to close After the search node set instruction execution of the adjacency search node of system, and it is described according to the described search node collection for calculating acquisition The inspiration cost of each adjacency search node in conjunction, in described search node set selection inspire cost it is highest at least one Before adjacency search node is as lower layer's search node instruction execution of described search node, comprising:
For the search node in described search node set, according in the corresponding parameter space of described search node Weight parameter group, using the weight parameter group as the weight parameter of at least two translation model;
Using the weight parameter of at least two translation model as foundation, turned over using reordering to described at least two It translates the textual translation that model respectively exports to be merged, obtains the referenced text translation of the text to be translated;
The referenced text translation is compared with the true translation of the corpus, determines the referenced text translation phase Translation accuracy rate and/or translation loss for the true translation;
Judge whether the translation accuracy rate and/or the translation loss are greater than the upper layer search node of described search node Corresponding translation accuracy rate and/or translation loss;
If being not more than, described search node is rejected from the search node set belonging to it.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group instruction of at least two translation model of Suo Suoshu, is realized based on beam search algorithm.
Optionally, the weight parameter that the target weight parameter group that will be searched includes is as described at least two After the target weight parameter instruction of translation model executes, comprising:
Text to be translated is inputted at least two translation model respectively and carries out text translation, output is for described respectively The textual translation of text to be translated;
Using reordering, the textual translation respectively exported at least two translation model is merged, obtain it is described to The optimal textual translation of cypher text.
Optionally, the textual translation that each translation model exports at least two translation model is by least one text Sentence composition is translated, and the sentence of translating in the textual translation respectively corresponds sentence to be translated in the text to be translated.
Optionally, described to be melted using the textual translation respectively exported at least two translation model that reorders It closes, obtains the optimal textual translation of the text to be translated, comprising:
For each of the text to be translated sentence to be translated, according to the target weight of at least two translation model Parameter is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence;The text translates sentence collection by described wait turn over It translates sentence corresponding at least two text in the textual translation that at least two translation model exports and translates sentence composition;
Sentence is translated according to the corresponding optimal texts of sentence to be translated all in the text to be translated, by the text to be translated All corresponding optimal texts of sentence to be translated translate sentence and are fused into the optimal textual translation in this.
Optionally, described for each of the text to be translated sentence to be translated, according at least two translations mould The target weight parameter of type is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence, comprising:
It is respectively defeated according to the target weight parameter of at least two translation model and at least two translation model The translation probability of each sentence to be translated in the text to be translated out calculates the corresponding text of the sentence to be translated and translates sentence concentration Each text translates the translation evaluation score of sentence;
Translating sentence in the corresponding text of the sentence to be translated concentrates the highest text of selected text translation evaluation score to translate sentence as institute The optimal text for stating sentence to be translated translates sentence.
A kind of computer readable storage medium embodiment provided by the present application is as follows:
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction To be used for when being executed by processor:
Obtain the respective translation exported after at least two translation models translate the corpus in corpus, Yi Jisuo State the translation probability that sentence is each translated in translation;
Based on the translation probability for each translating sentence in the translation and the translation, described at least two are searched in parameter space The corresponding weight parameter group of a translation model;
Using the weight parameter that the target weight parameter group searched includes as at least two translation model Target weight parameter.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group of at least two translation model of Suo Suoshu, comprising:
Search tree is constructed based on the translation probability for each translating sentence in the translation and the translation;In the parameter space Search node in weight parameter group and described search tree corresponds;
The corresponding weight parameter of at least two translation model is searched in the parameter space according to described search tree Group.
Optionally, described that search tree sub-step is constructed based on the translation probability for each translating sentence in the translation and the translation In implementation procedure, the search node in described search tree is corresponded to for the weight parameter group in the parameter space, is executed as follows Operation:
According to the weight parameter group in the corresponding parameter space of described search node, using the weight parameter group as The weight parameter of at least two translation model, and described search is calculated in conjunction with the translation probability for each translating sentence in the translation The inspiration cost of node;
Wherein, the inspiration cost of described search node is according to the mould of each translation model at least two translation model Type inspires cost to calculate and obtains, and the model of each translation model inspires the weight parameter and the translation that cost is the translation model In each translate sentence translation probability the sum of products.
Optionally, in described search tree any one search node lower layer's search node, determine in the following way:
It determines adjacent with described search node in described search tree using Gauss algorithm and there is the adjacent of connection relationship to search The search node set of socket point;
According to the inspiration cost for calculating each adjacency search node in the described search node set obtained, in described search The lower layer's search section for inspiring at least one highest adjacency search node of cost as described search node is selected in node set Point.
Optionally, described to determine adjacent with described search node in described search tree using Gauss algorithm and there is connection to close After the search node collection substep of the adjacency search node of system executes, and it is described according to the described search node for calculating acquisition The inspiration cost of each adjacency search node in set, selection inspires cost highest at least one in described search node set Before a adjacency search node is executed as lower layer's search node sub-step of described search node, comprising:
For the search node in described search node set, according in the corresponding parameter space of described search node Weight parameter group, using the weight parameter group as the weight parameter of at least two translation model;
Using the weight parameter of at least two translation model as foundation, turned over using reordering to described at least two It translates the textual translation that model respectively exports to be merged, obtains the referenced text translation of the text to be translated;
The referenced text translation is compared with the true translation of the corpus, determines the referenced text translation phase Translation accuracy rate and/or translation loss for the true translation;
Judge whether the translation accuracy rate and/or the translation loss are greater than the upper layer search node of described search node Corresponding translation accuracy rate and/or translation loss;
If being not more than, described search node is rejected from the search node set belonging to it.
Optionally, described based on the translation probability for each translating sentence in the translation and the translation, it is searched in parameter space The corresponding weight parameter group step of at least two translation model of Suo Suoshu is realized based on beam search algorithm.
Optionally, the weight parameter that the target weight parameter group that will be searched includes is as described at least two After the target weight parameter step of translation model executes, comprising:
Text to be translated is inputted at least two translation model respectively and carries out text translation, output is for described respectively The textual translation of text to be translated;
Using reordering, the textual translation respectively exported at least two translation model is merged, obtain it is described to The optimal textual translation of cypher text.
Optionally, the textual translation that each translation model exports at least two translation model is by least one text Sentence composition is translated, and the sentence of translating in the textual translation respectively corresponds sentence to be translated in the text to be translated.
Optionally, described to be melted using the textual translation respectively exported at least two translation model that reorders It closes, obtains the optimal textual translation of the text to be translated, comprising:
For each of the text to be translated sentence to be translated, according to the target weight of at least two translation model Parameter is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence;The text translates sentence collection by described wait turn over It translates sentence corresponding at least two text in the textual translation that at least two translation model exports and translates sentence composition;
Sentence is translated according to the corresponding optimal texts of sentence to be translated all in the text to be translated, by the text to be translated All corresponding optimal texts of sentence to be translated translate sentence and are fused into the optimal textual translation in this.
Optionally, described for each of the text to be translated sentence to be translated, according at least two translations mould The target weight parameter of type is translated sentence and concentrated in the corresponding text of the sentence to be translated selects optimal text to translate sentence, comprising:
It is respectively defeated according to the target weight parameter of at least two translation model and at least two translation model The translation probability of each sentence to be translated in the text to be translated out calculates the corresponding text of the sentence to be translated and translates sentence concentration Each text translates the translation evaluation score of sentence;
Translating sentence in the corresponding text of the sentence to be translated concentrates the highest text of selected text translation evaluation score to translate sentence as institute The optimal text for stating sentence to be translated translates sentence.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited The technical solution of storage media and the technical solution of above-mentioned model parameter searching method belong to same design, the technology of storage medium The detail content that scheme is not described in detail may refer to the description of the technical solution of above-mentioned model parameter searching method.
The computer instruction includes computer program code, the computer program code can for source code form, Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code Device, read-only memory (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 the computer-readable medium include it is interior Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification, It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only It is limited by claims and its full scope and equivalent.

Claims (15)

1. a kind of model parameter searching method characterized by comprising
It obtains the respective translation exported after at least two translation models translate the corpus in corpus and described translates The translation probability of sentence is each translated in text;
Based on the translation probability for each translating sentence in the translation and the translation, described at least two are searched in parameter space and is turned over Translate the corresponding weight parameter group of model;
Using the weight parameter that the target weight parameter group searched includes as the target of at least two translation model Weight parameter.
2. model parameter searching method according to claim 1, which is characterized in that described based on the translation and described to translate The translation probability that sentence is each translated in text searches for the corresponding weight parameter group of at least two translation model in parameter space, Include:
Search tree is constructed based on the translation probability for each translating sentence in the translation and the translation;Weight in the parameter space Search node in parameter group and described search tree corresponds;
The corresponding weight parameter group of at least two translation model is searched in the parameter space according to described search tree.
3. model parameter searching method according to claim 2, which is characterized in that described based on the translation and described to translate It is each translated in text in the translation probability building search tree sub-step implementation procedure of sentence, for the weight parameter in the parameter space Search node in the corresponding described search tree of group, performs the following operations:
According to the weight parameter group in the corresponding parameter space of described search node, using the weight parameter group as described in The weight parameter of at least two translation models, and described search node is calculated in conjunction with the translation probability for each translating sentence in the translation Inspiration cost;
Wherein, the inspiration cost of described search node is opened according to the model of each translation model at least two translation model It sends out cost and calculates acquisition, the model of each translation model inspires every in the weight parameter that cost is the translation model and the translation The sum of products of a translation probability for translating sentence.
4. model parameter searching method according to claim 3, which is characterized in that any one in described search tree is searched for Lower layer's search node of node, determines in the following way:
Adjacency search section adjacent with described search node in described search tree and with connection relationship is determined using Gauss algorithm The search node set of point;
According to the inspiration cost for calculating each adjacency search node in the described search node set obtained, in described search node The lower layer's search node for inspiring at least one highest adjacency search node of cost as described search node is selected in set.
5. model parameter searching method according to claim 4, which is characterized in that described in the use Gauss algorithm determines Adjacent with described search node and with connection relationship the search node collection substep of adjacency search node is held in search tree After row, and it is described according to the inspiration cost for calculating each adjacency search node in the described search node set obtained, in institute It states and selects to inspire at least one the highest lower layer of adjacency search node as described search node of cost in search node set Before search node sub-step executes, comprising:
For the search node in described search node set, according to the power in the corresponding parameter space of described search node Weight parameter group, using the weight parameter group as the weight parameter of at least two translation model;
Using the weight parameter of at least two translation model as foundation, mould is translated to described at least two using reordering The textual translation that type respectively exports is merged, and the referenced text translation of the text to be translated is obtained;
The referenced text translation is compared with the true translation of the corpus, determine the referenced text translation relative to The translation accuracy rate and/or translation loss of the true translation;
The upper layer search node for judging whether the translation accuracy rate and/or the translation loss are greater than described search node is corresponding Translation accuracy rate and/or translation loss;
If being not more than, described search node is rejected from the search node set belonging to it.
6. model parameter searching method according to claim 1, which is characterized in that described based on the translation and described to translate The translation probability that sentence is each translated in text searches for the corresponding weight parameter group step of at least two translation model in parameter space Suddenly, it is realized based on beam search algorithm.
7. model parameter searching method according to claim 1, which is characterized in that described to join the target weight searched After the weight parameter that array includes is executed respectively as the target weight parameter step of at least two translation model, packet It includes:
Text to be translated is inputted at least two translation model respectively and carries out text translation, output is for described wait turn over respectively The textual translation of translation sheet;
Using reordering, the textual translation respectively exported at least two translation model is merged, and is obtained described to be translated The optimal textual translation of text.
8. model parameter searching method according to claim 7, which is characterized in that every at least two translation model The textual translation of a translation model output is translated sentence by least one text and is formed, and the sentence of translating in the textual translation respectively corresponds Sentence to be translated in the text to be translated.
9. model parameter searching method according to claim 8, which is characterized in that it is described using reorder to it is described at least The textual translation that two translation models respectively export is merged, and the optimal textual translation of the text to be translated is obtained, comprising:
For each of the text to be translated sentence to be translated, according to the target weight parameter of at least two translation model Translating sentence in the corresponding text of the sentence to be translated and concentrate selects optimal text to translate sentence;The text translates sentence collection by the sentence to be translated Corresponding at least two text translates sentence composition in the textual translation of at least two translation model output;
Sentence is translated according to the corresponding optimal texts of sentence to be translated all in the text to be translated, it will be in the text to be translated All corresponding optimal texts of sentence to be translated translate sentence and are fused into the optimal textual translation.
10. model parameter searching method according to claim 9, which is characterized in that described to be directed to the text to be translated Each of sentence to be translated, according to the target weight parameter of at least two translation model in the corresponding text of the sentence to be translated Originally translating sentence concentrates the optimal text of selection to translate sentence, comprising:
It is respectively exported according to the target weight parameter of at least two translation model and at least two translation model The translation probability of each sentence to be translated in the text to be translated calculates the corresponding text of the sentence to be translated and translates sentence concentration each Text translates the translation evaluation score of sentence;
The corresponding text of the sentence to be translated translate sentence concentrate the highest text of selected text translation evaluation score translate sentence as it is described to The optimal text of translation sentence translates sentence.
11. a kind of model parameter searcher characterized by comprising
Corpus translation module, is configured as obtaining after at least two translation models translate the corpus in corpus and exports The translation probability of sentence is each translated in respective translation and the translation;
Weight parameter group searching module, is configured as based on the translation probability for each translating sentence in the translation and the translation, The corresponding weight parameter group of at least two translation model is searched in parameter space;
Target weight parameter determination module, the weight parameter that the target weight parameter group for being configured as to search includes are made respectively For the target weight parameter of at least two translation model.
12. model parameter searcher according to claim 11, which is characterized in that the weight parameter group searching mould Block, comprising:
Search tree constructs submodule, is configured as constructing based on the translation probability for each translating sentence in the translation and the translation and search Suo Shu;The search node in weight parameter group and described search tree in the parameter space corresponds;
Submodule is searched for, is configured as searching at least two translation model in the parameter space according to described search tree Corresponding weight parameter group.
13. model parameter searcher according to claim 11 characterized by comprising
Translation translation module is configured as respectively inputting text to be translated at least two translation model and carries out text and turns over It translates, output is directed to the textual translation of the text to be translated respectively;
Translation Fusion Module, be configured as using reorder textual translation that at least two translation model is respectively exported into Row fusion, obtains the optimal textual translation of the text to be translated.
14. a kind of calculating equipment characterized by comprising
Memory and processor;
The memory executes real when the computer executable instructions for storing computer executable instructions, the processor The step of model parameter searching method described in existing claims 1 to 10 any one.
15. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor The step of model parameter searching method described in claims 1 to 10 any one is realized when row.
CN201910227374.XA 2019-03-25 2019-03-25 Model parameter searching method and device Active CN109960814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910227374.XA CN109960814B (en) 2019-03-25 2019-03-25 Model parameter searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910227374.XA CN109960814B (en) 2019-03-25 2019-03-25 Model parameter searching method and device

Publications (2)

Publication Number Publication Date
CN109960814A true CN109960814A (en) 2019-07-02
CN109960814B CN109960814B (en) 2023-09-29

Family

ID=67024924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910227374.XA Active CN109960814B (en) 2019-03-25 2019-03-25 Model parameter searching method and device

Country Status (1)

Country Link
CN (1) CN109960814B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110732138A (en) * 2019-10-17 2020-01-31 腾讯科技(深圳)有限公司 Virtual object control method and device, readable storage medium and computer equipment
CN110837741A (en) * 2019-11-14 2020-02-25 北京小米智能科技有限公司 Machine translation method, device and system
CN112256827A (en) * 2020-10-20 2021-01-22 平安科技(深圳)有限公司 Sign language translation method and device, computer equipment and storage medium
WO2021109679A1 (en) * 2019-12-06 2021-06-10 中兴通讯股份有限公司 Method for constructing machine translation model, translation apparatus and computer readable storage medium
CN114239608A (en) * 2021-11-16 2022-03-25 北京百度网讯科技有限公司 Translation method, model training method, device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420331A (en) * 2008-12-12 2009-04-29 北京邮电大学 Fast fault locating method for ultra-long connection in T-MPLS network
US20090222437A1 (en) * 2008-03-03 2009-09-03 Microsoft Corporation Cross-lingual search re-ranking
JP2009294747A (en) * 2008-06-03 2009-12-17 National Institute Of Information & Communication Technology Statistical machine translation device
JP2016058003A (en) * 2014-09-12 2016-04-21 日本放送協会 Translation device
CN105791117A (en) * 2016-03-21 2016-07-20 广东科学技术职业学院 QoSR fast solving method based on ant colony algorithm
US20160306793A1 (en) * 2013-12-04 2016-10-20 National Institute Of Information And Communications Technology Learning apparatus, translation apparatus, learning method, and translation method
US20160350290A1 (en) * 2015-05-25 2016-12-01 Panasonic Intellectual Property Corporation Of America Machine translation method for performing translation between languages
CN106484681A (en) * 2015-08-25 2017-03-08 阿里巴巴集团控股有限公司 A kind of method generating candidate's translation, device and electronic equipment
CN108054968A (en) * 2017-11-17 2018-05-18 江西理工大学 A kind of open-loop control method of new-energy automobile

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222437A1 (en) * 2008-03-03 2009-09-03 Microsoft Corporation Cross-lingual search re-ranking
JP2009294747A (en) * 2008-06-03 2009-12-17 National Institute Of Information & Communication Technology Statistical machine translation device
CN101420331A (en) * 2008-12-12 2009-04-29 北京邮电大学 Fast fault locating method for ultra-long connection in T-MPLS network
US20160306793A1 (en) * 2013-12-04 2016-10-20 National Institute Of Information And Communications Technology Learning apparatus, translation apparatus, learning method, and translation method
JP2016058003A (en) * 2014-09-12 2016-04-21 日本放送協会 Translation device
US20160350290A1 (en) * 2015-05-25 2016-12-01 Panasonic Intellectual Property Corporation Of America Machine translation method for performing translation between languages
CN106484681A (en) * 2015-08-25 2017-03-08 阿里巴巴集团控股有限公司 A kind of method generating candidate's translation, device and electronic equipment
CN105791117A (en) * 2016-03-21 2016-07-20 广东科学技术职业学院 QoSR fast solving method based on ant colony algorithm
CN108054968A (en) * 2017-11-17 2018-05-18 江西理工大学 A kind of open-loop control method of new-energy automobile

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
梁华参: "基于短语的统计机器翻译模型训练中若干关键问题的研究", 《中国博士学位论文全文数据库 (信息科技辑)》, pages 138 - 75 *
段楠等: "统计机器翻译中一致性解码方法比较分析", 《中文信息学报》 *
段楠等: "统计机器翻译中一致性解码方法比较分析", 《中文信息学报》, no. 01, 15 January 2013 (2013-01-15), pages 64 - 71 *
潘一荣;李晓;杨雅婷;董瑞;: "面向汉维机器翻译的双语关联度优化模型", 计算机应用研究, no. 03, pages 726 - 730 *
邬开俊;鲁怀伟;杜三山;: "二进制粒子群优化算法在车辆路径问题中的应用", 西北民族大学学报(自然科学版), no. 04, pages 12 - 15 *
陈洁;廖伟;: "求解多车辆装载问题的启发式改进蚁群算法设计", 计算机与数字工程, pages 17 - 19 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110732138A (en) * 2019-10-17 2020-01-31 腾讯科技(深圳)有限公司 Virtual object control method and device, readable storage medium and computer equipment
CN110732138B (en) * 2019-10-17 2023-09-22 腾讯科技(深圳)有限公司 Virtual object control method, device, readable storage medium and computer equipment
CN110837741A (en) * 2019-11-14 2020-02-25 北京小米智能科技有限公司 Machine translation method, device and system
CN110837741B (en) * 2019-11-14 2023-11-07 北京小米智能科技有限公司 Machine translation method, device and system
WO2021109679A1 (en) * 2019-12-06 2021-06-10 中兴通讯股份有限公司 Method for constructing machine translation model, translation apparatus and computer readable storage medium
CN112256827A (en) * 2020-10-20 2021-01-22 平安科技(深圳)有限公司 Sign language translation method and device, computer equipment and storage medium
CN114239608A (en) * 2021-11-16 2022-03-25 北京百度网讯科技有限公司 Translation method, model training method, device, electronic equipment and storage medium
CN114239608B (en) * 2021-11-16 2022-11-25 北京百度网讯科技有限公司 Translation method, model training method, device, electronic equipment and storage medium
JP7472421B2 (en) 2021-11-16 2024-04-23 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド Translation method, model training method, apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
CN109960814B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN109960814A (en) Model parameter searching method and device
Mehri et al. Structured fusion networks for dialog
CN110147437A (en) A kind of searching method and device of knowledge based map
Su et al. A genetic algorithm for operation sequencing in CAPP using edge selection based encoding strategy
CN105808590B (en) Search engine implementation method, searching method and device
CN106294661B (en) A kind of extended search method and device
CN109815952A (en) Brand name recognition methods, computer installation and computer readable storage medium
CN104090976B (en) The method and device of search engine crawler capturing webpage
CN108268668B (en) Topic diversity-based text data viewpoint abstract mining method
CN105653673B (en) Information search method and device
CN106649742A (en) Database maintenance method and device
CN109933656A (en) Public sentiment polarity prediction technique, device, computer equipment and storage medium
CN110019732A (en) A kind of intelligent answer method and relevant apparatus
CN108280057A (en) A kind of microblogging rumour detection method based on BLSTM
CN105740227A (en) Genetic simulated annealing method for solving new words in Chinese segmentation
CN108304509A (en) A kind of comment spam filter method for indicating mutually to learn based on the multidirectional amount of text
CN109033390A (en) The method and apparatus for automatically generating similar question sentence
CN107463935A (en) Application class methods and applications sorter
CN115114395B (en) Content retrieval and model training method and device, electronic equipment and storage medium
CN107862004A (en) Intelligent sorting method and device, storage medium, electronic equipment
CN110083729A (en) A kind of method and system of picture search
CN110909230A (en) Network hotspot analysis method and system
CN110245191A (en) Data processing method and device
CN112199606A (en) Social media-oriented rumor detection system based on hierarchical user representation
CN109670624A (en) A kind of method and device for estimating dining waiting time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant