Text language detection

Information

  • Patent Application
  • 20020095288
  • Publication Number
    20020095288
  • Date Filed
    September 05, 2001
    23 years ago
  • Date Published
    July 18, 2002
    22 years ago
Abstract
A method of determining the language of a text message received by a mobile telecommunications device comprises receiving an input text message at a mobile telecommunications device; analysing the input text message using language information stored in the mobile telecommunications device; selecting, from a group of languages defined by the language information, a most likely language for the input text message; and outputting, from the mobile telecommunications device, speech signals corresponding to the input text message, in the selected language.
Description


FIELD OF THE INVENTION

[0001] The present invention relates to text language detection, and in particular to methods for detecting the language of text message in a mobile telecommunications system, for example an SMS message, an e-mail or a WAP page.



BACKGROUND OF THE INVENTION

[0002] A Text To Speech (TTS) system is a device for translating text to audio signals. Due to the fast development of the semiconductor industry, these systems are today entering the consumer electronics market. In particular, these systems are today being implemented in Personal Computers (PCs), Personal Digital Assistants (PDAs), Mobile Phones (MPs) and Car Accessories (CAs).


[0003] One of the most desirable applications for a TTS system is in car hands-free equipment for mobile telephones. Today, mobile phones have the possibility of receiving so-called SMS (short message service) text messages. Through these SMS messages, text can be transmitted to a specific mobile subscriber. The messages can be created and edited, for example, in another mobile telephone or in an e-mail editor at a PC. SMS messages can also be used for transmission of traffic information and other news and data.


[0004] SMS messages are normally represented in a display of the mobile telephone and the user has to read them from there. However, there are many situations where reading the display can be difficult and even dangerous. In a car hands-free situation, for example, the driver may not be able to read the display contents since he/she has to concentrate on the road. For this reason, there are now law restrictions on using mobile phones while driving. Text to speech conversion is a good solution to overcoming the restriction. The TTS reads the text for the user through the loudspeaker.


[0005] However, a problem with currently available systems is that they normally support only one language. In some more advanced equipment, the user must choose manually the language to use by the TTS system. However, since different languages have different pronunciations of the alphabet, a message in one language can be unintelligible if spoken by a system designed for another language.


[0006] It will be readily appreciated that similar comments apply to text received in the form of e-mails, WAP (Wireless Application Protocol) pages or other text systems, in addition to SMS messages.



SUMMARY OF THE PRESENT INVENTION

[0007] One embodiment of the present invention provides means for automatically detecting the incoming language by inspecting statistics of the text. By analysing text string statistics, for example character frequency and temporal dependency of characters, the language used can be estimated or recognised. This analysis is done before feeding the TTS system with the incoming text string.


[0008] It is emphasised that the term “comprises” or “comprising” is used in this specification to specify the presence of stated features, integers, steps or components, but does not preclude the addition of one or more further features, integers, steps or components, or groups thereof.


[0009] According to one aspect of the present invention, there is provided a method of determining the language of a text message received by a mobile telecommunications device, the method comprising:


[0010] receiving an input text message at a mobile telecommunications device;


[0011] analysing the input text message using language information stored in the mobile telecommunications device;


[0012] selecting, from a group of languages defined by the language information, a most likely language for the input text message; and


[0013] outputting, from the mobile telecommunications device, speech signals corresponding to the input text message, in the selected language.


[0014] According to another aspect of the invention, there is provided a method of determining the language of a text message, the method comprising:


[0015] receiving an input text message comprising a plurality of characters;


[0016] for each character, except the last in the message, determining respective probability values for selected languages, each probability value being indicative of the probability that the character concerned is followed by the next character in the message in the language concerned;


[0017] for each language, accumulating the probability values determined for each character in the message; and


[0018] determining the language of the text message on the basis of the accumulated probability values.


[0019] According to another aspect of the invention, there is provided a method of determining the language of a text message, the method comprising:


[0020] receiving an input text message comprising a plurality of characters;


[0021] defining a plurality of groups of n characters in the message;


[0022] for each character group, except the last in the message, determining respective probability values for selected languages, each probability value being indicative of the probability that the character group concerned is followed by the next character group in the message in the language concerned;


[0023] for each language, accumulating the probability values determined for each character group in the message; and


[0024] determining the language of the text message on the basis of the accumulated probability values.


[0025] According to another aspect of the invention, there is provided a method of determining the language of an incoming text message, the method comprising:


[0026] receiving an incoming text message which comprises a plurality of words;


[0027] comparing each word with each of a plurality of language models relating to respective languages;


[0028] for each language, recording the number of words that match words stored in the language models;


[0029] selecting the language of the text message on the basis of the language model having the highest number of word matches.


[0030] According to another aspect of the invention, there is provided a mobile telecommunications device comprising:


[0031] a receiver for receiving input text message;


[0032] a storage unit for storing language information;


[0033] a text message analyser for analysing received input text messages using language information stored in the storage unit; and


[0034] a speech output unit for outputting speech signals relating to a received input text message, in a language determined by the text message analyser.







BRIEF DESCRIPTION OF THE DRAWINGS

[0035]
FIG. 1 illustrates a Discrete Markov Model;


[0036]
FIG. 2 illustrates a language detection apparatus; and


[0037]
FIG. 3 illustrates a language detection method.







DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0038] In the 1940's, information theorists discovered that a Discrete Markov Model (DMM) could generate strings of characters that are very similar to the English language, see e.g. Shannon, CE (1948), A Mathematical theory of Communication, Bell Sys Tech. In the simplest models, a DMM was used where the states S={si:i=1, . . . , L} represented the set of the L characters of the alphabet S and the transition probabilities
1{asi,sj}Li,j=1


[0039] modelled the relative frequency that a character Sj follows a character Si. For example see the transition diagram of FIG. 1. In FIG. 1, not all possible transitions have been shown in order to improve the clarity of the Figure. Each capital letter (A, B, C . . . ) Represents a state (for single letters the characters themselves), and ai,j represents the probability of changing from state i to state j.


[0040] Better models can be obtained by letting the states represent bigrams or trigrams, i.e. pairs or triplets of characters. In the general case, n-grams, i.e. a group of n characters, can be used.


[0041] In the present invention these DMM results are used in the opposite direction. That is, a set of DMMs, modelling respective languages, are used to analyse the received text string and calculate which model could have produced the string. Once the appropriate model has been found, the corresponding language is selected for use by the TTS system.


[0042] Since the mathematics are fundamentally the same, whether the DMM states represents single characters, bigrams or trigrams, the following description of a method embodying the invention relates to the use of single characters. It will be readily appreciated that the description holds for the bigrams, trigrams and n-grams.


[0043] In mathematical terms, the problem of finding the most probable language can be formulated as follows:


[0044] Let Λm, (m=1, . . . , M) represent M different DMMs, each of one representing one of the M specific languages and let {overscore (u)}=[u1, . . . uN] be a vector consisting of N ASCII characters (representing the incoming message). Pr(Λ|{overscore (u)}) is defined to be the probability that a given language was used to generate the incoming text message, conditioned on the knowledge of {overscore (u)}. Then, the maximum a-posteriori language selection {circumflex over (Λ)} is given by solving equation (i):
2Λ^=argmax1mMPr(Λm&RightBracketingBar;u_)(i)


[0045] It will be appreciated that if the string U has itself been generated by a DMM that it is possible to show that this is an optimum solution.


[0046] Using Bayes Theorem for conditional probabilities, the same solution is obtained by solving:
3Λ^=argmax1mMPr(u_&LeftBracketingBar;Λm)p(Λm),(ii)


[0047] where p(Λm) is the a-priori probability than language Λm has been used in the generation of u.


[0048] In order to solve this equation, let
4{asj,sj(m)}i,j=1L


[0049] be the transition probabilities for the language model Λm and qsj(m) be the probability that a text string starts in language m with the character sj. Then, we have
5Λ^=argmax1mMp(Λm)qu1(m)i=1N-1aui,ui+1(m)(iii)


[0050] An equivalent solution can be obtained by using the logarithms of the Probabilities (LP). In this case we have equation (iv):
6Λ^=argmax1mMlog(p(Λm))+log(qu1(m))+i=1N-1log(aui,ui+1(m))(iv)


[0051] In a practical implementation of the invention, the values of LPs are pre-stored in DMM lookup tables for respective language models.


[0052]
FIG. 2 illustrates a system for detecting the input language and for reading out the text message in the detected language. The system of FIG. 2 includes a processing unit 2, a storage unit 4, an output unit 6 and an output speaker 8. The processing unit 2 includes a language selection unit 21 which is operable in accordance with the present invention to determine the language of an input text character sequence u. Operation of the system of FIG. 2 will now be described with reference to FIG. 2 and the flowchart of FIG. 3.


[0053] The input character sequence u is received by the selection unit 21 (step A), which divides the sequence into a series of n-grams (i.e. groups of n characters) (step B). For the sake of clarity, the system will be described with n=1, i.e. individual characters, but it will be readily appreciated that the number of characters in, a group can be chosen arbitrarily. For example, n=2 or 3 can provide useful results.


[0054] For each pair of characters (i.e. a character and the next in the sequence), a probability value ai,j is determined by reference to predefined language models 41 stored in the storage unit 4 (step C). This probability value is indicative of the probability of occurrence of the pair of characters in the language concerned. As described above, the probability values are determined by a discrete Markov model (DMM) of the language concerned. Preferably, the probability values are stored as logarithms of probabilities (LP).


[0055] The retrieved probability values are accumulated for each language model by the processing unit. In the case of simple probability values, the accumulation is performed according to equation (iii) above. In the preferred embodiment using LPs, the accumulation is performed by using equation (iv) above. When all of the probability values for the character sequence have been accumulated, each language model will have an aggregate probability value. The most likely language is then determined by evaluating equation (iii) or (iv) (step E). The language model that produces the larges accumulated probability value is regarded as the most likely language of the incoming text message. The task of the microprocessor 2 is to accumulate the corresponding probabilities according to the received text string u for all M languages and select the most probable language. Thereafter, the most probable language is selected and the language specific code is chosen for string analysis and conversion.


[0056] The analysis and conversion unit 22 receives notification of the determined language from the selection unit 21 and then converts the character sequence to appropriate voice signals with reference to language-dependent code 42 stored in the storage unit 4. The voice signals are then processed by a voice synthesiser 61 (step G) and D/A converter 62 to produce analogue signals suitable for output by a loudspeaker 8 (step H).


[0057] The size of the DMM tables can be reduced by several ways. The most straightforward method is to translate {overscore (u)} into capital letters prior the probability calculations. Another method is to cluster types of letters (bigrams or trigrams) and let them be presented by one state.


[0058] It will be readily appreciated that the embodiments described above use conditional probability to determine the most likely language of an incoming text message. The Dmm statistics that are pre-stored are used to determine, for each language, the probability that one character (or group of characters) follows another character (or group).


[0059] A system embodying another aspect of the present invention is shown in FIG. 4 and its operation illustrated in FIG. 5. The system includes a processor 9 which receives the incoming text message (step A′). A set of language models 10, such as the Tegic T9™ or Zi Corp™ models, is provided for comparison with the incoming text message. Each word of the text message is compared with the language models 10 (step B′), and the number of matches for each language is recorded (step C′). The language of the text message is then determined to be the language of the model which has the highest number of word matches. Preferably, the text language detection in accordance with this aspect of the invention uses a language model that is already provided in the device.


[0060] Using a language model which is already available in the device enables the device to be provided with language detection facilities without the need for adding complex processing and algorithms to be provided in the device. Other uses of such models are for text input prediction. Such models tend to be relatively simple dictionaries having the primary purpose of predicting keypad entry of text messages.


Claims
  • 1. A method of determining the language of a text message received by a mobile telecommunications device, the method comprising: receiving an input text message at a mobile telecommunications device; analysing the input text message using language information stored in the mobile telecommunications device; selecting, from a group of languages defined by the language information, a most likely language for the input text message; and outputting, from the mobile telecommunications device, speech signals corresponding to the input text message, in the selected language.
  • 2. A method as claimed in claim 1, wherein the input text message comprises a plurality of characters and wherein the step of analysing the input text message comprises: for each character, except the last in the message, determining respective probability values for selected languages, each probability value being indicative of the probability that the character concerned is followed by the next character in the message in the language concerned; and for each language, accumulating the probability values determined for each character in the message.
  • 3. A method as claimed in claim 1, wherein the input text message comprises a plurality of words and wherein the step of analysing the input text message comprises: comparing each word of the message with each of a plurality of language models relating to respective languages; for each such language, determining the number of words that match words stored in the respective language models.
  • 4. A method as claimed in claim 3, wherein the language having the highest number of word matches is selected.
  • 5. A method as claimed in claim 3, wherein the language models are provided in the mobile telecommunications device for the purpose of predicting text message input.
  • 6. A method of determining the language of a text message, the method comprising: receiving an input text message comprising a plurality of characters; for each character, except the last in the message, determining respective probability values for selected languages, each probability value being indicative of the probability that the character concerned is followed by the next character in the message in the language concerned; for each language, accumulating the probability values determined for each character in the message; and determining the language of the text message on the basis of the accumulated probability values.
  • 7. A method as claimed in claim 6, wherein probability values are pre-stored in storage means and are retrieved therefrom.
  • 8. A method as claimed in claim 6, wherein the probability values are determined by transition probability values of a discrete Markov model of each language.
  • 9. A method as claimed in claim 8, wherein, for each language, the probability values are accumulated according to the equation:
  • 10. A method as claimed in claim 8, wherein for each language, the probability values are stored as logarithm of probability values.
  • 11. A method as claimed in claim 10, wherein, for each language, the probability values are accumulated according to the equation:
  • 12. A method of determining the language of a text message, the method comprising: receiving an input text message comprising a plurality of characters; defining a plurality of groups of n characters in the message; for each character group, except the last in the message, determining respective probability values for selected languages, each probability value being indicative of the probability that the character group concerned is followed by the next character group in the message in the language concerned; for each language, accumulating the probability values determined for each character group in the message; and determining the language of the text message on the basis of the accumulated probability values.
  • 13. A method as claimed in claim 12, wherein probability values are pre-stored in storage means and are retrieved therefrom.
  • 14. A method as claimed in claim 12, wherein the probability values are determined by transition probability values of a discrete Markov model of each language.
  • 15. A method as claimed in claim 14, wherein, for each language, the probability values are accumulated according to the equation:
  • 16. A method as claimed in claim 14, wherein for each language, the probability values are stored as logarithm of probability values.
  • 17. A method as claimed in claim 16, wherein, for each language, the probability values are accumulated according to the equation:
  • 18. A method as claimed in claim 12, wherein the number, n, of characters in each group is 2.
  • 19. A method as claimed in claim 12, wherein the number, n, of characters in each group is 3.
  • 20. A method of determining the language of an incoming text message, the method comprising: receiving an incoming text message which comprises a plurality of words; comparing each word with each of a plurality of language models relating to respective languages; for each language, recording the number of words that match words stored in the language models; selecting the language of the text message on the basis of the language model having the highest number of word matches.
  • 21. A method as claimed in claim 20, wherein the language having the highest number of word matches is selected.
  • 22. A method as claimed in claim 20, wherein the language models are provided in the mobile telecommunications device for the purpose of predicting text message input.
  • 23. A mobile telecommunications device comprising: a receiver for receiving input text message; a storage unit for storing language information; a text message analyzer for analyzing received input text messages using language information stored in the storage unit; and a speech output unit for outputting speech signals relating to a received input text message, in a language determined by the text message analyzer.
  • 24. A device as claimed in claim 23, wherein the storage unit is operable to store language information for use in text message input prediction.
  • 25. A device as claimed in claim 23, wherein the text message analyzer is operable to analyze each character or groups of characters in the text message.
Priority Claims (1)
Number Date Country Kind
0021869.3 Sep 2000 GB