top of page
eabaffipalubhols

Direct to indirect speech converter software: How it works and why you need it



In general, one innovative aspect of the subject matter described in this specification can be embodied in methods that include the actions of receiving a voice input corresponding to an utterance; determining whether a transcription of the utterance includes a command to initiate a communication to a user and a segment that is classified as indirect speech; in response to determining that the transcription of the utterance includes the command and the segment that is classified as indirect speech: providing the segment that is classified as indirect speech as input to a machine translator; in response to providing the segment that is classified as indirect speech to the machine translator, receiving a direct speech segment from the machine translator; and initiating a communication that includes the direct speech segment. Other embodiments of this aspect include corresponding systems, apparatus, and computer programs, configured to perform the actions of the methods, encoded on computer storage devices.




Direct to indirect speech converter software



These and other embodiments can each optionally include one or more of the following features. Aspects can further include determining that the transcription includes the command to initiate the communication and a segment that is classified as direct speech; and in response to determining that the transcription includes the command to initiate the communication and the segment that is classified as direct speech, initiating a communication that includes the segment that is classified as direct speech.


The machine translator can determine a semantic meaning of the segment that is classified as indirect speech. The machine translator can also generate the direct speech segment to include a meaning that matches the semantic meaning of the segment that is classified as indirect speech. The machine translator can apply a set of grammar rules to the segment that is classified as indirect speech to convert the segment that is classified as indirect speech to the direct speech segment.


Determining whether the transcription includes a segment that is classified as indirect speech can include identifying a transitional word disposed between the command and a segment of the transcription and determining whether the segment of the transcription includes an indirect speech segment.


Aspects can further include identifying a portion of the transcription as a candidate indirect speech segment; determining a confidence score for the candidate indirect speech segment, the confidence score specifying a measure of confidence that the candidate indirect speech segment is an indirect speech segment; determining that the confidence score satisfies a confidence threshold; and classifying the candidate indirect speech segment as indirect speech in response to the confidence score satisfying the confidence threshold.


The machine translator can convert the segment that is classified as indirect speech to the direct speech segment by adjusting an order of words in the segment that is classified as indirect speech to generate the direct speech segment. The machine translator can convert the segment that is classified as indirect speech to the direct speech segment by replacing a word of the segment that is classified as indirect speech with another word different than the word to generate the direct speech segment.


Aspects can further include providing the communication including the direct speech segment for confirmation prior to sending the communication; receiving confirmation data indicating that the communication has been confirmed; and sending the communication in response to receiving the confirmation data.


Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages. Users can initiate communications to other users using more natural speech, rather than being required to speak particular command phrases and their message in a direct speech format. Users can more quickly provide voice commands as they are not required to provide two distinct phrases, a particular command phrase and a message phrase. A machine translator can provide accurate translations of indirect speech to direct speech for use in communications initiated by voice.


The indirect speech segment 133 (or another element) may compare the indirect speech confidence score to an indirect speech threshold to determine whether to classify the message segment as indirect speech. If the indirect speech confidence score satisfies the indirect speech threshold, e.g., by meeting or exceeding the indirect speech threshold, the indirect speech classifier 133 may classify the message segment as an indirect speech segment.


The indirect speech classifier 133 can also classify a message segment as a direct speech segment. For example, if the indirect speech confidence score for the message segment does not satisfy the threshold, the indirect speech classifier 133 may classify the message segment as a direct speech segment. Or, the indirect speech classifier 133 may make a positive determination that the message segment is a direct speech segment by determining a direct speech confidence score that specifies a measure of confidence that the message segment is a direct speech segment and comparing that confidence score to a direct speech threshold. If the direct speech confidence score satisfies the direct speech confidence score, the indirect speech classifier 133 may classify the message segment as a direct speech segment.


If the message segment is classified as an indirect speech segment, the semantic parser 132 (or indirect speech classifier 133) provides the message segment to a machine translator 134 that converts the message segment to a direct speech segment. If the message segment is not classified as an indirect speech segment, the semantic parser 132 may provide the message segment to a message generator 136. The semantic parser 132 may also provide the command segment to the message generator 136.


In some implementations, the machine translator 134 includes or has access to a set of rules 135 that the machine translator 134 uses to convert indirect speech segments to direct speech segments. The rules 135 may include grammar rules that define how the indirect message segments are to be converted. For example, the grammar rules may specify how an indirect speech segment should be reconstructed from the point of view of another speaker, such as from a third person point of view to a first person point of view.


In some implementations, the machine translator 134 is trained using training samples. Each training sample may be a message pair that includes an indirect speech message and its corresponding direct speech message. The machine translator 134 can evaluate the training samples to learn the structures of indirect speech messages and the structures of direct messages, and how to convert the indirect speech messages to direct speech messages based on their differing structures.


In some implementations, the machine translator 134 is trained as if direct speech is a different language than indirect speech. For example, machine translators can be used to translate from one language, such as English, to another language, such as French. The machine translators can translate between languages by identifying a semantic meaning of the input text and identifying words in the other language that have the same meaning. The machine translator 134 can be trained similarly to translate input indirect speech text to direct speech text based on the meaning of the input indirect speech text. Once trained, the machine translator 134 can identify a meaning of an input indirect speech message or a meaning of multiple disparate portions of the message and identify words to create a direct speech message having the same meaning. The machine translator 134 can also organize the words in an order to correspond to a direct speech format.


The machine translator 134 may be trained and/or implemented differently based on the language that it will be used to convert. For example, a rules-based machine translator may provide better translations from indirect speech to direct speech for one language, while a machine translator trained using training samples may provide better translations from indirect speech to direct speech for a different language.


Once trained, the machine translator 134 can be used to convert input text that is classified as indirect speech to direct speech. For a rules-based machine translator, the machine translator 134 can apply one or more rules to the input text to convert the text to direct speech. A machine translator trained using training samples can convert the text to direct speech by substituting words and changing the order of words based on the structures learned from the training samples and/or a meaning of the words identified by the machine translator.


The message generator 136 can generate a message that includes the direct speech segment and that is addressed to the proper recipient, e.g., the determined recipient or user-selected recipient. If the application for the message is e-mail, the message generator 136 may interact with an e-mail application to generate an e-mail message that includes the direct speech segment and that is addressed to the recipient. Similarly, if the application for the message is text messaging, the message generator 136 may interact with a text messaging application to generate a text message that includes the direct speech segment and that is addressed to the recipient.


The semantic parser 136 provides data 207 specifying the message segment 210 and optionally the command segment 215 to an indirect speech classifier 133. The indirect speech classifier 133 determines whether to classify the message segment 210 as indirect speech. The indirect speech classifier 133 may evaluate the syntactic structure of the message segment 210 and optionally the syntactic structure of the command segment 215 and determine whether to classify the message segment 210 as indirect speech based on the evaluation. The indirect speech classifier 133 can provide data 220 specifying the classification to the semantic parser 132. In this example, the indirect speech classifier 133 classified the message segment 210 as indirect speech. 2ff7e9595c


1 view0 comments

Recent Posts

See All

Comentarios


bottom of page