Detailed Description
Conventional neural networks generally include an input layer, one or more hidden layers, and an output layer, where the layers may be fully connected, but the nodes between each layer are connectionless. Such common neural networks are ineffectual for many problems. For example, in speech recognition or natural language processing, it is generally necessary to base the word that appears before, provided that it is desired to predict what the next word of the sentence is. This is because the words before and after a sentence are not independent of each other.
In this case, a Recurrent Neural Network (RNN) has developed. To process sequence data, the RNN relates the current output of a sequence to the previous output. Thus, the network will memorize the previous information and apply it to the calculation of the current output. In other words, the nodes between hidden layers are no longer connectionless but connected, and the input of a hidden layer includes not only the output of the input layer/previous hidden layer but also the output of the present hidden layer at the previous moment.
Recurrent Neural Networks (RNNs) are most commonly used for time-series data mining. Recurrent neural networks are a class of neural networks with memory capabilities and are therefore often used for mining data with time dependencies. In general, neurons in a recurrent neural network are able to receive not only information from other neurons, but also information themselves, forming a cascade of network structures with loops.
Fig. 1 shows a diagram of an example simple Recurrent Neural Network (RNN) 100. As can be seen, the left part represents a simplified RNN structure, with the lowest circle representing the input layer, the middle circle representing the hidden layer, and the uppermost circle representing the output layer. X in the input layer represents the input layer value vector. S in the hidden layer represents a hidden layer value vector. O in the output layer represents the output layer value vector. U, V and W represent weight matrices connecting the respective layers, respectively.
The functional relationship between the hidden layer value vector S and the input layer value vector X is shown in the following formula (1):
S t =f(U·X t +W·S t-1 +b) (1)
as can be seen, the hidden layer value vector S at time t t Not only on the current input layer value vector X t And a weight matrix U connecting the input layer and the hidden layer, and also depends on the hidden layer value vector S of the previous time t-1 t-1 And a corresponding weight matrix W (and possibly also the bias term b).
On the other hand, the output layer value vector O at time t t And hidden layer value vector S t For example, the functional relationship of (2) is as follows:
O t =g(V·S t ) (2)
as can be seen, the output layer value vector O at time t t Depending on the current hidden layer value vector S t And a weight matrix V connecting the hidden layer and the output layer.
By spreading the RNN 100 in time, the structure of the right part of fig. 1 is obtained. As can be seen, the RNN adds a delay from the hidden layer back to the hidden layer compared to a fully connected structure such as a multi-layer perceptron (MLP), thus giving the RNN a "memory" function. And is thus particularly suitable for processing time series data.
In theory, RNNs are able to process sequence data of any length. That is, the length of the input sequence may not be fixed. In practice, however, for the sake of complexity reduction, it is often assumed that the current state is only related to a limited number of states in front. RNNs and their various variants (e.g., bi-directional RNN, LSTM, GRU, etc.) have enjoyed great success and widespread use in numerous natural language processing.
RNNs can be categorized into a variety of structures depending on the number of input and output sequences, including: one-to-one structures, one-to-many structures, many-to-one structures, many-to-many structures, etc. The multi-pair multi-structure may also include structures with input and output sequences of equal length and structures with input and output sequences of unequal length. The many-to-many structure with unequal input and output sequences is called the seq2seq (sequence to sequence) model. A common seq2seq model may comprise an encoder-decoder structure, i.e. using two RNNs, one RNN acting as an encoder and the other RNN acting as a decoder. According to one implementation, one word/word in the sequence may be input into the encoder at each instant. The encoder is responsible for compressing the input sequence into a vector of a specified length (i.e., embedding), which can be regarded as the semantics of the sequence, a process called encoding. The decoder is then responsible for generating the specified sequence from the semantic vector, a process called decoding.
One of the ways the encoder obtains the semantic vector may include directly taking the hidden state of the last input as the semantic vector C. Another way of obtaining the semantic vector may include transforming the last hidden state to obtain the semantic vector C. The way the semantic vector is obtained may also include transforming all hidden states of the input sequence to obtain the semantic vector C. The decoder may input the semantic variable obtained by the encoder as an initial state into the RNN as the decoder to obtain an output sequence. According to one exemplary implementation, the semantic vector C may participate in operations only as an initial state. According to another exemplary implementation, the semantic vector C may participate in operations at all instants of the sequence in the decoder.
LSTM (long term memory) networks are a special class of RNNs designed to address the above-mentioned problems of RNNs, etc. In general, RNNs may include a chain structure of repeating neural network unit modules. In a standard RNN, this replicated unit cell typically includes only a simple structure, such as a tanh layer. LSTM is also a chain structure, but the repeated unit modules have a more complex structure. In particular, the unit modules of a general LSTM may include an input gate, a forget gate, an output gate, and a cell, which interact in a specific manner, wherein the forget gate may be used to forget information that is not already needed, the input gate and the output gate may be used for input and output of parameters, and the cell is used to store a state. LSTM also has various modifications. Attention (attention) mechanisms introduced in recent years can greatly improve the efficiency of LSTM, thereby bringing a wider prospect for LSTM.
Fig. 2 shows a diagram of an example LSTM network 200. LSTM network 200 may include a plurality of cells in cascade. Each cell may obtain the output of the present stage by performing embedding based on the output of the previous stage and the input of the present stage. Specifically, as can be seen, first, the current input may be cascaded with the previous h, with the result being noted as x. Then, x may perform matrix point multiplication operations with weight matrices w (f), w (i), w (j), and w (o), respectively, to obtain result matrices f, i, j, o, where w (f), w (i), w (j), and w (o) are core weight parameters of the LSTM cell, and training is performed for the four weight matrix parameters. Next, a matrix f is subjected to a sigmod operation, i.e., a sigmod (f), a matrix i is also subjected to a sigmod operation, i.e., a sigmod (i), a matrix j is subjected to a tanh operation, i.e., a tanh (j), a matrix o is subjected to a sigmod operation, i.e., a sigmod (o), and then a new c is calculated, where new c=old c x sigmod (f) + (sigmod (i) xtanh (j)). Finally, a new h is calculated, where new h=tanh (new c) sigmod (o). After the operation, the cell is calculated, and a new c and a new h are obtained. And then taking h as the output of the time, and taking the binary group (c, h) as the cell state of the time to be stored for the next cell calculation.
One of the fundamental steps in the processing of natural language involves word segmentation. In a line text of a word-based language such as english, spaces between words are used as natural delimiters. In a scene such as chinese, only words, sentences and paragraphs can be simply delimited by obvious delimiters, without formal explicit delimiters between words. Therefore, in performing the natural language processing of the text, it is generally necessary to perform word segmentation first. Existing word segmentation algorithms can be divided into three main categories: word segmentation method based on character string matching, word segmentation method based on understanding and word segmentation method based on statistics. According to the combination of the part-of-speech labeling process or not, the method can be divided into a simple word segmentation method and an integrated method combining word segmentation and labeling.
Fig. 3 illustrates a word segmentation system 300 according to an exemplary aspect of the present disclosure. As can be seen, the word segmentation system 300 includes a word segmenter 301. When a sentence is input to the word segmenter 301, the word segmenter 301 outputs a segmented result. The word segmenter 301 may be implemented with any prior art or future technique word segmentation algorithm.
For example, in a chinese word segmentation scene, word segmentation methods based on character string matching, such as a forward maximum matching method, a reverse maximum matching method, a least segmentation method, and the like, may be used; word segmentation method based on understanding; a word segmentation method based on statistics; rule-based word segmentation methods such as minimum matching algorithm, maximum matching algorithm, word-by-word matching algorithm, neural network word segmentation algorithm, association-backtracking method, N-shortest path word segmentation algorithm, etc.; algorithms based on word frequency statistics, based on expected word segmentation, finite multi-level enumeration, etc.
As can be seen, although one possible word segmentation result is shown above, different word segmentation results may be obtained with different word segmentation algorithms.
According to an exemplary embodiment, the source document may be input into the segmenter sentence by sentence, and the segmenter outputs the segmented source sentence (or other unit) sentence by sentence or integrally outputs the segmented source document. According to another exemplary embodiment, the source document may be integrally input into the word segmenter, and the word segmenter may output the segmented source document (or other unit) sentence by sentence or integrally.
FIG. 4 illustrates a block diagram of a deep learning model 400 in accordance with an exemplary aspect of the present disclosure. Deep learning model 400 may include, for example, a seq2seq model. According to an exemplary, but non-limiting embodiment, the seq2seq model may comprise, for example, an encoder portion 410 and a decoder portion 420, wherein the encoder portion 410 may comprise a unit module h 1 ,h 2 ,……h n . Unit module h 1 ,h 2 ,……h n May be implemented, for example, using the unit modules (expanded in time lines) discussed above in connection with RNNs (e.g., LSTM) and form a chain structure discussed above in connection with RNNs (e.g., LSTM) expanded in time lines. h is a 0 May be a feature (or source style) of the source document. Features may refer to classifications, identifications, genres, applicable people groups, etc. of paragraphs, examples of which may include, for example, general body, palace body, northeast words, young people words, etc. … …. This will be described further below.
x 1 ,x 2 ,……x n Is to the unit module h 1 ,h 2 ,……h n Is input to the computer. X is x 1 ,x 2 ,……x n May include a word or sequence of words that may be obtained by word segmentation of natural sentences in the source document. For example, the word segmentation of natural sentences may be implemented using the word segmentation system described above in connection with fig. 2.
According to an exemplary, but non-limiting embodiment, n may be a fixed window length. When the length of the natural sentence after word segmentation is smaller than n (e.g., x only 1 ,x 2 ,……x i Wherein i is<n), the remaining portion may be filled with a blank (e.g., x is filled with i+1 ,……x n ). On the other hand, when the length of the natural sentence after word segmentation is greater than n, the sentence can be segmented. The segmentation criteria may include, for example, commas, mood words, and/or other overt segmentation words, etc., or any combination thereof.
According to an exemplary but non-limiting embodimentExemplary embodiment, unit Module h 1 ,h 2 ,……h n Word/word sequence x, which can be input based on the present level 1 ,x 2 ,……x n And the output of the preceding stage unit module is embedded to obtain the output vector h of the current stage 1 ,h 2 ,……h n Wherein h is 1 ,h 2 ,……h n-1 Respectively, to the next unit module in the chain structure as its input.
Can be based on the last unit module h of the encoder n Output (i.e. hidden state) h n To obtain the semantic vector C. For example, according to an exemplary, but non-limiting embodiment, h can be directly taken n As semantic vector C. According to another exemplary but non-limiting embodiment, may include the following steps for h n A transformation is performed to obtain a semantic vector C. According to yet another exemplary but non-limiting embodiment, the input sequence x may be 1 ,x 2 ,……x n All hidden states h of (2) 1 ,h 2 ,……h n The semantic vectors C are aggregated (and optionally transformed).
The decoder portion 420 may include a unit module h 1 ’,h 2 ’,……h m ' wherein m may be greater than, equal to, or less than n. Unit module h 1 ’,h 2 ’,……h m ' may be implemented, for example, using the unit modules discussed above in connection with RNNs (e.g., LSTM) and form a chain structure discussed above in connection with RNNs (e.g., LSTM).
According to an exemplary, but non-limiting embodiment, h 0 ' input to the unit module h 1 ’,h 0 ' may be a feature of the target document (or target style), which may be different from the source document feature. Examples of target manuscript features may include, for example, a general body, a palace body, northeast words, young people expressions, and the like … ….
According to an exemplary, but non-limiting embodiment, unit module h 1 ’,h 2 ’,……h m-1 ' the output vector h of the present stage can be obtained by embedding based on the semantic vector C and the output of the preceding stage unit module 1 ’,h 2 ’,……h m-1 ' to next unit module h 2 ’,……h m '. In the example of fig. 4, the semantic vector C is input to each unit module h of the decoder 420 1 ’,h 2 ’,……h m-1 '. In alternative embodiments, the semantic vector C may also be input into only the first unit module of the decoder 420, for example.
According to an exemplary, but non-limiting embodiment, unit module h 1 ’,h 2 ’,……h m ' y is output separately by embedding the outputs of the previous stages based on semantic vectors 1 ,y 2 ,……y m 。y 1 ,y 2 ,……y m A sequence of words or words may also be included. Combination y 1 ,y 2 ,……y m The obtained sequence can be the natural sentence input sequence x of the source style 1 ,x 2 ,……x n And (3) rewriting the characteristics of the target manuscript to obtain a target natural sentence output sequence.
According to an exemplary, but non-limiting embodiment, similarly, when the output sequence length is less than m (e.g., y only 1 ,y 2 ,……y j Wherein j is<m) can be used with the output of the remainder (e.g., y j+1 ,……y m ) May be filled with a blank. On the other hand, the sentence sliced at the encoder may be reassembled after being output at the decoder. The decoded sentences are combined in sequence to form the target document.
The various unit modules in encoder 410 and decoder 420 may be implemented with various RNN structures, including, for example, but not limited to, the network structures described above in connection with fig. 1 and 2, and the like.
Although the embodiments are described in connection with outputting a target document corresponding to one target style, as can be appreciated, the present disclosure may encompass implementations in which a plurality of target documents corresponding to a plurality of target styles are output simultaneously or sequentially, respectively.
By converting the source style content (e.g., sentence, paragraph, article) into the target style corresponding content (e.g., sentence, paragraph, article) by the encoder and decoder as described with reference to the exemplary embodiment of fig. 4, a deep learning-assisted rewrite flow can be implemented, and thus the work efficiency of the contribution rewrite can be greatly improved.
Training of the deep learning model may include, for example, offline training and online training. FIG. 5 illustrates a flow chart of an offline training method 500 of a deep learning model (e.g., model 400 of FIG. 4) according to an exemplary aspect of the present disclosure.
The method 500 may include setting up a feature library at block 502. As previously described, a feature may refer to a classification, identification, genre, applicable crowd, etc. of a paragraph, examples of which may include, for example, general, palace, northeast, young people, etc. … …. Features may be represented by phrases or identifiers, etc. For example, according to one example, the natural sentence "good" may be characterized as a plain body. The palace body natural sentence corresponding to the palace body natural sentence is 'this is thought to be excellent'. Setting up the feature library may include, for example, setting up different features according to different preferences for the population. The number of different article types that the model can rewrite depends on the number of different features.
At block 504, the method 500 generates a library of document materials. The library of document materials is associated with a particular feature. A library of document materials of a particular feature may refer to a collection of documents having the particular feature. Generating a library of document materials associated with a particular feature may include, for example, crawling all articles with the particular feature from a featured website (e.g., microblog, headline, knowledgeable, etc.). Generating the document materials library associated with a particular feature may also include retrieving on a search engine using the feature to obtain top-ranked articles of relevance. Generating a library of document materials associated with a particular feature may also include, after obtaining certain article data in the various manners described above or any combination thereof, utilizing a machine learning method to learn a marking model, and then searching for more articles related to the feature in the text crawled on the web. According to an exemplary, but nonlimiting, embodiment, learning the marking model may include learning a text classifier and then training the text classifier with articles captured and/or obtained as described above as a training set. After training, the trained text classifier can be utilized to search more articles related to the corresponding features in the text crawled on the internet. After generating two or more document feature libraries associated with at least two or more of the feature types in the feature library, the method 500 may proceed to block 506.
At block 506, the method 500 trains a deep learning model, such as the seq2seq model or the like. According to an exemplary but non-limiting embodiment, training the deep learning model may include generating a training dataset by finding pairs of articles in each document material library that have the same or similar subject matter but different features (e.g., classification of paragraphs, identification, genre, applicable crowd, etc.). The subject matter being identical or similar may include one or more of the following: contains the same keywords and/or has a sufficiently high similarity for each respective sentence in the article. The similarity may be calculated using various algorithms including, but not limited to, for example, word vector based similarity (e.g., cosine similarity, manhattan distance similarity, euclidean distance similarity, bright distance similarity, etc.), character based similarity (e.g., edit distance similarity, simhash, number of common characters, etc.), probabilistic statistics based similarity (e.g., jekcard similarity coefficients, etc.), word embedding model based similarity (e.g., word2vec/doc2vec, etc.).
According to another exemplary, but non-limiting embodiment, the training data set may also be obtained from other sources. For example, the training data set may be obtained directly from an external source. After the training data set is generated or obtained, a deep learning model, such as the deep learning model 400 described with reference to FIG. 4, may be trained using one article of the pair of articles in the training data set as a source document and the other article as a target document. The above-described exemplary embodiments are trained on the granularity of articles, but the present disclosure is not limited thereto. According to another exemplary, but non-limiting embodiment, training may also be performed at sentence or other granularity.
Fig. 6 illustrates a block diagram of a method 600 of intelligent document rewrite using a trained deep learning model in accordance with an aspect of the disclosure. Method 600 includes, at block 602, inputting a source document, a source style, and a target style. The source style may represent a characteristic of the source document, including, for example, a category or style to which it belongs. The target style may represent a characteristic of the document to be rewritten, including, for example, a category or style to which it belongs. According to an exemplary, but non-limiting embodiment, the source style may also be determined directly on a source document basis without additional input.
At block 604, the method 600 includes outputting the target document with a trained deep learning model. For example, for the deep learning model described with reference to FIG. 4, a source document may be segmented into x by natural sentence 1 ,x 2 ,……x n . The segmentation may be implemented using, for example, the segmentation system 300 described in connection with fig. 3. X after word segmentation 1 ,x 2 ,……x n The unit modules h that can be respectively input to the encoder 410 1 ,h 2 ,……h n . According to an exemplary, but non-limiting embodiment, when the length of a natural sentence after segmentation is less than n (e.g., x only 1 ,x 2 ,……x i Wherein i is<n), the remaining portion may be filled with a blank (e.g., x is filled with i+1 ,……x n ). On the other hand, when the length of the natural sentence after word segmentation is greater than n, the sentence can be segmented. The segmentation criteria may include, for example, commas, mood words, and/or other overt segmentation words, etc., or any combination thereof. The source style is input to h 0 . For example, sentence 1 in the source document is segmented into x 1 ,x 2 ,……x n . Source style h 0 And the first word x 1 Is input to the first unit module h 1 . The first unit module is used for the first word x 1 Carry out ebedding and output vector h 1 . Vector h 1 And the second word x 2 Are input together to the second unit module h 2 . The second unit module h 2 For the second word x 2 Carry out ebedding and output vector h 2 . Vector h 2 And the third word x 3 Are input together to the third unit module h 3 And so on. Vector h n-1 And the nth word x n Are input together to the nth unit modeBlock h n . The nth unit module is used for the nth word x n Carry out ebedding and output vector h n . Through the unit modules h 1 ,h 2 ,……h n Concatenating, creating word x of the sentence 1 ,x 2 ,……x n Contextual relation between them. As can be seen, although h is used for both the unit modules and the vectors output by them n The expression of the form is merely for the convenience of identifying the correlation thereof, and their respective meanings are clear and should not be confused.
For a deep learning model described with reference to, for example, fig. 4, the last unit module h of the encoder may be based on n Output (i.e. hidden state) h n To obtain the semantic vector C. For example, according to an exemplary, but non-limiting embodiment, h can be directly taken n As semantic vector C. According to another exemplary but non-limiting embodiment, may include the following steps for h n A transformation is performed to obtain a semantic vector C. According to yet another exemplary but non-limiting embodiment, the input sequence x may be 1 ,x 2 ,……x n All hidden states h of (2) 1 ,h 2 ,……h n The semantic vectors C are aggregated (and optionally transformed). The semantic vector C may be input to the respective unit modules h of the decoder section 120 1 ’,h 2 ’,……h m ' wherein m may be greater than, equal to, or less than n. h is a 0 ' input to the unit module h 1 ’,h 0 ' may be a feature of the target document (or target style), which may be different from the source document feature. Unit module h 1 ’,h 2 ’,……h m-1 ' carrying out ebadd on the semantic vector C and outputting a vector h respectively 1 ’,h 2 ’,……h m-1 ' to next unit module h 2 ’,……h m '. Unit module h 1 ’,h 2 ’,……h m ' also output y respectively 1 ,y 2 ,……y m 。y 1 ,y 2 ,……y m May include a sequence of words or words. y is 1 ,y 2 ,……y m Can be a pair of sequencesNatural sentence input sequence x of source style 1 ,x 2 ,……x n And (5) rewriting the characteristics of the target manuscript to obtain a sentence output sequence. According to an exemplary, but non-limiting embodiment, similarly, when the output sequence length is less than m (e.g., y only 1 ,y 2 ,……y j Wherein j is<m) can be used with the output of the remainder (e.g., y j+1 ,……y m ) May be filled with a blank. On the other hand, the sentence sliced at the encoder may be reassembled after being output at the decoder.
At optional block 606, method 600 may include optionally performing a manually assisted overwrite adjustment. If the article manuscript automatically rewritten by the deep learning model reaches the available standard, the article manuscript may need to be edited and audited manually. However, compared with pure manual rewrite, the automatic rewrite of the deep learning model can greatly reduce the degree of manual intervention and the workload. For example, according to an exemplary, but non-limiting embodiment, an editing interface may be provided to facilitate the addition, deletion, and/or modification of sentences in an editing box by a user. According to another exemplary, but non-limiting embodiment, addition, deletion, and/or substitution of paragraphs and/or sentences, etc. may also be supported. For example, sentences may be manually entered by the user at the time of addition or may be automatically retrieved from a library of manuscript materials. As another example, at the time of replacement, sentences automatically generated by the deep learning model may be manually input by the user or provided for selection.
At block 608, the method 600 may include outputting the result. Outputting the results may include, for example, outputting the rewritten sentence/article. After the overwriting is completed, there may be corresponding saving, previewing, auditing, and/or publishing, etc.
Optional block 606 may also be omitted or repositioned. For example, the results may be output at block 608 and manually assisted overwrite adjustment may be performed as appropriate or necessary later.
FIG. 7 illustrates a diagram of a scenario 700 for intelligent document rewrite using a trained deep learning model in accordance with an exemplary aspect of the present disclosure.
As can be seen, a source document 701 is input into a word segmentation module 702. The word segmentation module 702 may, for example, include the word segmentation system 300 described above in connection with fig. 3, and the like. The word segmentation module 702 may output the segmented document 703 based on the employed word segmentation algorithm.
The segmented manuscript (e.g., segmented natural sentence or other element) 703 is input into a trained deep learning model 704. The segmented manuscript 703 may be inputted into the deep learning model 704 sentence by sentence, or may be inputted into the deep learning model 704 in other units. For example, the segmented document 703 may be input to the deep learning model 704 as a whole, or may be streamed to the deep learning model 704 while being generated.
A source style corresponding to the source document 701 and a target style corresponding to the target document may be input into the deep learning model 704. According to alternative embodiments, the source style may also be automatically identified by the system from the source document. In this case, the system may also include, for example, a feature recognition module (not shown). For example, the source style may be a plain body and the target style may be a young person term.
The deep learning model 704 may include, for example, the deep learning model 400 described above in connection with fig. 4, or variants thereof, and the like. Based on the source style and the target style, the deep learning model 704 can rewrite the segmented source document 703 accordingly, for example, rewrite it from a general body to a body of a young person.
The deep learning model 704 outputs a target document 705 rewritten based on the target style. According to an exemplary embodiment, target document 705 may be output sentence-by-sentence, such as outputting a target sentence every time a source sentence is input, or outputting a target sentence-by-sentence for an entirely input source document. According to another exemplary embodiment, the target document 705 may be output in its entirety. For example, for a source document that is input as a whole, all target sentences may be combined and output after they are obtained. For another example, for a source document input sentence by sentence, all target sentences may be combined and output after obtaining them. Combining the target sentences may include sequentially combining the target sentences to obtain the target document. The target document 705 may be output directly to the outside or may be output after further manual-assisted rewrite adjustment after being provided by the deep learning model 704.
FIG. 8 illustrates a block diagram of an offline training device 800 of a deep learning model in accordance with an exemplary aspect of the present disclosure. The deep learning model may include, for example, the deep learning model 400 described in connection with fig. 4, and the like.
According to an exemplary, but non-limiting embodiment, the offline training device 800 of the deep learning model may include a module 802 for setting up a feature library. The module 802 for setting up the feature library may, for example, implement the functionality described above in connection with block 502 of fig. 5, etc.
According to an exemplary, but non-limiting embodiment, the offline training device 800 of the deep learning model may further include a module 804 for generating a library of document materials. The module for generating a library of document materials 804 may, for example, implement the functions described above in connection with block 504 of fig. 5, etc.
According to an exemplary, but non-limiting embodiment, the offline training apparatus 800 of the deep learning model may further comprise a module 806 for training the deep learning model. The module for training the deep learning model 806 may, for example, implement the functionality described above in connection with block 506 of fig. 5, etc.
Fig. 9 illustrates a block diagram of an apparatus 900 for intelligent document rewrite using a trained deep learning model in accordance with an aspect of the disclosure.
According to an exemplary, but non-limiting embodiment, intelligent document rewrite apparatus 900 may include a module 902 for inputting a document, a source style, and a target style. The module 902 for entering the document, source style, and target style may, for example, implement the functionality described above in connection with block 602 of fig. 6, and the like. Although a direct input source style is described in the present embodiment, a source style may be extracted from an input source document according to an alternative embodiment.
According to an exemplary, but non-limiting embodiment, intelligent document rewriting apparatus 900 may further include a module 904 for outputting the target document with the trained deep learning model. The module 904 for outputting the target document with the trained deep learning model may, for example, implement the functionality described above in connection with block 604 of fig. 6, etc.
According to an exemplary, but non-limiting embodiment, intelligent document rewriting apparatus 900 may also optionally include a module 906 for making manually-assisted rewrite adjustments. The module for manually assisted overwrite adjustment 906 may, for example, implement the functionality described above in connection with block 606 of fig. 6, etc.
According to an exemplary, but non-limiting embodiment, intelligent document rewriting apparatus 900 may further include a module 908 for outputting a result. The module 908 for outputting the results may, for example, implement the functionality described above in connection with block 608 of fig. 6, etc. The output result may be, for example, a target document or a part thereof rewritten by the deep learning model, or may be a target document or a part thereof adjusted by manual assist rewriting.
Although the present application is described with respect to the intelligent manuscript writing method and apparatus based on deep learning by taking the seq2seq model as an example, the present application is not limited thereto, but may be applied to any deep learning model in existing and future technologies.
Those of ordinary skill in the art will appreciate that the benefits of the present disclosure are not all achieved by any single embodiment. Various combinations, modifications, and substitutions will be apparent to those of ordinary skill in the art based on the present disclosure.
Furthermore, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise indicated or clear from the context, the phrase "X" employs "a" or "B" is intended to mean any of the natural inclusive permutations. That is, the phrase "X" employs "A" or "B" is satisfied by any of the following examples: x is A; x is B; or X employs both A and B. The terms "connected" and "coupled" may mean the same, meaning that the two devices are electrically connected. In addition, the articles "a" and "an" as used in this disclosure and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form.
The various aspects or features will be presented in terms of systems that may include a number of devices, components, modules, and the like. It is to be understood and appreciated that the various systems may include additional devices, components, modules, etc. and/or may not include all of the devices, components, modules etc. discussed in connection with the figures. Combinations of these approaches may also be used.
The various illustrative logics, logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. Further, at least one processor may include one or more modules operable to perform one or more of the steps and/or actions described above. For example, the embodiments described above in connection with the various methods may be implemented by a processor and a memory coupled to the processor, where the processor may be configured to perform any step of any of the methods described above, or any combination thereof.
Furthermore, the steps and/or actions of a method or algorithm described in connection with the aspects disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. For example, the embodiments described above in connection with the various methods may be implemented by a computer-readable medium storing computer program code which, when executed by a processor/computer, performs any step of any of the methods described above, or any combination thereof.
The elements of the various aspects described throughout this disclosure are all structural and functional equivalents that are presently or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Furthermore, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims.