METHOD FOR ANALYZING CURSIVE WRITING

Abstract: Information is extracted from a hand-written text by means of a graphics tablet (1). The curves thus obtained make it possible to recognize primitives, namely basic forms, representing a way of writing a part of a letter. More accomplished forms, called allographs, are constructed from primitives in order to construct a letter or in even a group of two or three letters. When the series of codes corresponds to a known object from a dictionary of allographs (3), each defined by the sequence of codes of its primitives, the corresponding allograph is recognized. The genetic algorithm is used to improve the population of strings. "Descendants", obtained by combining two starting strings (7), are constructed from a limited-quantity selection of strings (9), from among which descendants the most appropriate are in turn chosen, this gradually optimizing the population. Applications: recognition of cursive writing.

Description: Method for analyzing cursive writing. The present invention relates to a method for analyzing cursive writing, in which elementary forms are recognized in a word written with cursive writing and letters or groups of letters are reconstructed from these forms and a dictionary of groups of possible letters is searched for groups identical to the groups constructed from the forms extracted from the writing or resembling these groups, this delivering a plurality of strings of characters capable of corresponding to the word to be recognized. The automatic recognition of manuscript characters allows more natural communication between a user and a computer, without using a keyboard. The function con¬ sists in transforming cursive or "script" strokes into a string of characters. In this context, the Applicant has sought to recognize writing by recording the motion of the pen and by recognizing words with the aid of a lexicon. A process for analyzing cursive writing is described in the document EP- A-0 564 827 (International Business Machines). In this process, the written words are compared with those from a dictionary and those which resemble one another sufficiently are regarded as possible, this delivering a list of words. Each word of the list is assigned a score. The word having the best score is chosen. Current strategies in the field of the recognition of writing focus on the direction of writing (from right to left in western writing). However, the complexity of the problem does not allow the definition of an obvious strategy of analysis. In fact, there is a substantial lack of a priori information. The purpose of the invention is to improve the speed of calculation and the recognition performance of such a method. According to the invention, a reproduction procedure is carried out on the basis of a population of "candidate" strings, that is to say descendants in the genetic sense of the term, are constructed, a descendant string being obtained by crossing, that is to say combining elements picked from' two of the said strings of the population, and at least some of the descendant strings are appended to the starting population. Advantageously, the starting population consists of a selection of only the most appropriate strings, and only the most appropriate are in turn chosen among the 2 descendants to be appended to the starting selection. The population obtained following a first reproduction procedure may again be subjected to a reproduction procedure. According to an advantageous embodiment, each of the "parent" strings is picked at random from the starting population, and in each of the "parent" strings, that one of the elements which is picked therefrom in order to construct a descendant is picked therefrom also at random. With the purpose of enlarging the space of solutions which is explored, mutations are advantageously produced during some of the crossings. These aspects of the invention as well as other more detailed aspects will emerge more clearly by virtue of the following description of a non-limiting embodiment. Figure 1 is a diagrammatic view of the whole of a system for implementing the process according to the invention. Figure 2 represents pieces of letters used in determining the elements of words. Figure 3 illustrates the coding of the basic graphical elements of the word "this". Figure 4 represents diagrammatically the way to generate a descendant from two individuals. In respect of the recognition of a sequence of written words, it is assumed a priori that a specified language is involved (French, English, etc). A diagrammatic view of the whole of a system is depicted in Figure 1. Information is extracted from a handwritten text by means of a graphics tablet 1. Such a tablet records the speed and direction of movement of a pen on a tablet, whilst a person is writing. In order that the characteristics of the writing can be represented by codes, a preprocessing phase is carried out in a processing unit 2. Smoothing of the recorded signals makes it possible to overcome local variations due especially to the acquisition facilities, for example by means of a filter which replaces the components at the instant T j by the weighted mean of the components at times TJ.J, T j , T i+ 1 . This filter has three components so as to afford filtering of the curves representing the horizontal speed, the vertical speed and the direction angle. The curves thus obtained make it possible to recognize primitives, namely basic forms, representing a way of writing a part of a letter. Examples of primitives are an upwards spike, a downwards spike, a loop, a dome and a dish. After the preprocessing described above, the processing unit 2 carries out an analysis in order to find primitives. The position of the central zone of the word is estimated by calculating a histogram of the projections of the primitives onto a vertical. Each of the primitives is designated by a code. Twenty-eight different codes (called , β, 7, δ, etc) are used, based on four basic primitives (spike, loop, dome or dish, link between two primitives) and by considering their position with respect to the centre of the word. Certain word parts are isolated; for example the bars of the "t"'s and the dots of the "i"'s are extracted. More accomplished forms, called allographs, are formed from primitives so as to construct a letter or even a group of two or three letters. An allograph is therefore the representation of a way of writing a letter or a group of letters coded on the basis of primitives. By considering several items of information, such as the parts of the word which are situated below or above the central zone, or the presence of "t" bars or of "i" dots (indicating that the word could contain a "t" or an "i"), and by interpreting the pen movements, a call to a dictionary of allographs makes it possible to find allographs which seem to be present in the writing analyzed and to assemble them in order to make words. The words thus made may very well not exist in the specified language. The representations of allographs in terms of graphical primitives are built up on the basis of statistical information concerning the way in which the subject writes the 26 letters as well as the most often used digraphs or trigraphs (allographs with respectively two or three characters are called digraphs or trigraphs). When the series of codes corresponds to a known object from a dictionary of allographs, which is defined by the sequence of codes of its primitives, the corresponding allograph is recognized. Often only some of the codes of an allograph to be recognized correspond to a sequence of codes from the dictionary, and the allograph is not recognized with certainty. Several among the most probable solutions are then retained and in this way a population of possible solutions is processed next. The individuals of the population of possible solutions are called "strings". The representation of a string by the list of primitives describing how the word is written in cursive writing is called the "graphical image". A string can also be represented by the ASCII codes which define the letters thereof, and this representation is called the "lexical image". Figure 2 represents the primitives, slightly separated from one another relative to their position in a cursive script in which they would be joined up, of the allograph "TH n ", the n indicating that this is an n Λ way of writing the group of letters t, h. It consists of a tall upwards spike (code β), followed by a dish (code υ), a loop (code 0), a short downwards spike (code χ), followed by a dome (code e), and by a dish (code υ). Another illustration is the string TH^Ss (Figure 3), which is composed of three allographs and whose lexical image is the word "this". Its graphical image is the list: β, υ, o, χ, e, υ, T, λ. φ, K. The similarity between the graphical image of the string proposed as solution and the coding of the primitives of the word recorded by the graphics tablet 1 (Figure 1) and delivered in the form of codes of primitives by the processing unit 2 is called the "fitness". For example if the word to be recognized is "that" the string "TH 1 I 2 S 5 " has a higher fitness than "B 2 L 1 UE 1 ", because it corresponds better, although the correspondence is not complete. The fitness is evaluated by a fitness evaluation module 5 by means of a classical method of evaluating the correspondence between strings, for example the so-called "modified Levenshtein distance" method (4). A genetic algorithm is used to improve the population of strings. This is a procedure in which descendants, in the genetic sense of the term, namely strings obtained by combining starting strings, are constructed from a limited-quantity selection of strings, from among which descendants the most appropriate are in turn chosen, this gradually optimizing the population. Thus the word retained at the very end is the one which corresponds to the string having the best fitness. Preanalysis of the word to be recognized has delivered several strings of primitives, constituting the initial population which it will be sought to improve. A lexical analyzer generates, on the basis of a string of primitives, (for example α/3 δe), a list of possible words (for example TH AS S) from words contained in a dictionary of allographs 3. One way of representing each letter or group of letters is chosen at random from various ways of representing each letter or group of letters (for example TH j = first way of writing TH, AS 3 = third way of writing AS, S 5 = fifth way of writing S), and is used to transform these words from the lexicon into graphical images (here βφyr). The initial population is thus constructed with codings of allographs based on the words from a dictionary of allographs. Ordinarily in genetic methods the individuals constituting a population have a fixed size. Here on the contrary the length of a string is not fixed. The genetic algorithm is implemented by virtue of operators 6 to 9. Each of the operators calls upon the fitness evaluation module 5, especially to decide whether an individual from the population should be eliminated or preserved. The selection operator 9 makes it possible to contrive that, on average, the best strings are not lost and the worst disappear. For each string it determines whether it should be preserved or destroyed, according to a probability connected with the fitness, which is evaluated by the fitness evaluation module 5. The processing unit 2 delivers the starting population to the module 9. Two other operators are used: a crossing operator 7 and a mutation operator 8. Each string contains a share of significant information which forms its fitness. Unfortunately, it is awkward to locate this information in the string since the fitness is a global value relating to the whole of the string. A statistical method is used in the crossing operator 7 to solve this problem: firstly, strings from the population which are chosen at random are associated pairwise, the randomness being weighted to give the strings having a higher fitness a higher probability of being chosen. Next, each pair of strings undergoes a crossing as represented in Figure 4. The new string does not necessarily have a better fitness than its "parents", and a call to the fitness evaluation module makes it possible to choose the "offspring" to be preserved. As the starting population contains a limited number of allographs, the number of solutions which will be reviewed is limited. For the purpose of enlarging the space of solutions which is explored, the mutation operator 8 introduces noise into the crossing procedure: an allograph may be altered during the crossing, with a probability fixed at the start. Three types of mutation may be introduced, with various proportions of changed allographs relative to the total allographs of a string: - an alteration, that is to say an allograph changes: for example TH 3 SAM 4 E1 → TH 3 AT 2 Eι - an insertion, that is to say a new allograph is introduced: for example TH 3 SAM 4 E ! -* THgSAA^AT j E ! - a deletion, that is to say an allograph disappears: for example TH 3 SAM 4 E J → TH 3 E1 The value of a population depends on the way in which the new strings are chosen or generated, and how their mutations are operated. To improve the procedure, genetic operators are defined with a view to avoiding, as far as possible, the loss or degradation of significant word elements. A significant word element is a sub-string which possesses characteristics possessed by the best strings. When the lexical image has a poor fitness, the string should at least contain as many valid digraphs or trigraphs as possible (a digraph or a trigraph is valid if it is present in the dictionary of allographs: this presence depends especially on the language, for example the digraph "KN" is very rare in French whilst it is frequent in English). In an attempt to preserve these significant elements, the mutation or crossing operators 7 and 8 act in the following non-deterministic manner: considering the lexical image of a string, a transformation of a digraph or of a trigraph is accepted (probabilistically) if it creates a valid digraph or trigraph, or if it avoids the destruction thereof. So long as it has not been decided to stop the procedure, each string output by one of the operators 7 or 8 ascends to the selection operator 9 so as to be appended to the population (arrow 11). The module 6 determines whether the procedure should continue or be stopped. The effect of the action of the mutation operator is that the population is never entirely stable, which implies that the procedure could be continued indefinitely. Several criteria are used in the stop decision module 6 to determine whether or not a solution is valid and to decide to stop: - the best string has a lexical image which is in the dictionary of possible words 10, - the number of iterations reaches a set limit, - the fitness of the best strings is higher than a given value (for example, the graphical image of a string matches perfectly with the list of primitives of the word to be analyzed), - all the trigraphs of the lexical image of the best string are valid. A rapid analysis is carried out to decide whether, even though the lexical image does not belong to the dictionary of possible words, there are enough reasons for it to be valid: for example, if all the quadrigraphs of the form "X*ZT" or XY*T" are valid, the lexical image XYZT is capable of being a proper solution, even though XYZT does not belong to the dictionary, - the number of the best representatives of strings exceeds a fixed proportion of the total population. It should be noted that the last four conditions accord the algorithm the possibility of delivering a result which is not in the dictionary of possible words. If several different strings exist which are "first among equals", it is not possible to decide among them. In general each of these different strings itself exists as several specimens, thus constituting populations of several identical strings. They are then sorted, searching for the most numerous of these populations: this is in general the best one.

Claims: CLAIMS: 1. Method for analyzing cursive writing, in which elementary forms are recognized in a word written with cursive writing and letters or groups of letters are reconstructed from these forms and a dictionary of groups of possible letters is searched for groups identical to the groups constructed from the forms extracted from the writing or resembling these groups, this delivering a plurality of strings of characters capable of corresponding to the word to be recognized, characterized in that a reproduction procedure is carried out on the basis of this population of "candidate" strings, that is to say descendants in the genetic sense of the term, are constructed, a descendant string being obtained by crossing, that is to say combining elements picked from two of the said strings of the population, and in that at least some of the descendant strings are appended to the starting population. 2. Method according to the preceding claim, characterized in that the starting population consists of a selection of only the most appropriate strings, and only the most appropriate are in turn chosen among the descendants to be appended to the starting selection. 3. Method according to one of Claims 1 and 2, characterized in that the population obtained following a first reproduction procedure is again subjected to a repro¬ duction procedure. 4. Method according to any of one the preceding claims, characterized in that each of the "parent" strings is picked at random from the starting population. 5. Method according to any one of the preceding claims, characterized in that, in each of the "parent" strings, that one of the elements which is picked therefrom in order to construct a descendant is picked therefrom at random. 6. Method according to any one of the preceding claims, characterized in that mutations are produced during some of the crossings.

Inventors: GENTRIC PHILIPPE, GENTRIC, PHILIPPE
Applicants: GENTRIC PHILIPPE, PHILIPS ELECTRONICS NV, PHILIPS ELECTRONIQUE LAB, PHILIPS NORDEN AB, GENTRIC, PHILIPPE, LABORATOIRES D'ELECTRONIQUE PHILIPS, PHILIPS ELECTRONICS N.V.
Application year: 1995
Main classification: G06K9
IPC codes: G06F15, G06K9, G06N3