Abstract:
The Arabic poetry meter identification system and method produces coded Al-Khalyli transcriptions of Arabic poetry. The meters (Wazn, Awzan being forms of the Arabic poems units Bayt, Abyate) are identified. A spoken or written poem is accepted as input. A coded transcription of the poetry pattern forms is produced from input processing. The system identifies and distinguishes between proper spoken poetic meter and improper poetic meter. Error in the poem meters (Bahr, Buhur) and the ending rhyme pattern, “Qafiya” are detected and verified. The system accepts user selection of a desired poem meter and then interactively aids the user in the composition of poetry in the selected meter, suggesting alternative words and word groups that follow the desired poem pattern and dactyl components. The system can be in a stand-alone device or integrated with other computing devices.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to dedicated electronic devices and/or general purpose computerized systems for analyzing linguistic patterns, and particularly to an Arabic poetry meter identification system and method that identifies the Wazn and Awzan meter forms of the Bayt and Abyate Arabic poems units. 
     2. Description of the Related Art 
     Arabic is very different from the Indo-European languages in its letterforms, grammatical structure and sounds. Poetry played a special role in the Arabic culture and its literature. Poetry is freely quoted in homes, palaces, bazaars in the context of speeches, jokes, and the like. Classical Arabic poetry is very structured and quantitative. 
     Classical Arabic poetry follows strict rhyme forms called Meters (wazn, awzaan). Meters are based on the syllabic structure, rather than stress. A short syllable is a consonant followed by a short vowel. A long syllable is a voweled letter followed by either an unvoweled consonant or a long vowel. A nunation sign (an N sound) at the end of a word also makes the final syllable long. A classical Arabic poem follows one of sixteen or seventeen meters called poem&#39;s “sea” (Bahr, Bhour). Each one of these meters consists of a specific sequence of dactyls (Tafeyyla). 
     The meters normally used in Arabic poetry were first codified in the 8th century by Al-Khalil bin Ahmad and have changed little since. However, there was already sufficient flexibility in the existing meters to allow subsequent practitioners a good deal of innovation. 
     Each line of a poem is one unit or verse, and is called “Bayt”. A verse or couplet consists of two approximately equal and parallel parts in the same meter. Each half is called (Shatr; Shatrayn). The number of verses in a particular poem depends on the type of poem being composed, but seldom (at the period we are considering) exceeds one hundred. Below is an example of a commonly found meter, called “Taweel” in Arabic poetry, showing long (O—) and short (—) syllables. They represent pairs of half-lines and should be read from right to left. The patterns are not rigidly followed. Two short syllables may be substituted for a long one, and vice versa. 
     The Khalili transcription of the “Taweel” poem meter is shown below: 
     |O—O—O——|O—O——| |O—O—O——|O—O——| 
     The ending rhyme (Qafiya), a common rhyme at the end of each poem line, is basically determined by the last consonant of a word. The ending rhyme also follows specific patterns and should be consistent throughout the poem. In rhyme-words, Nunation (the sound of the N phoneme) is dropped, as (sometimes) is the final vowel. Because short vowels are generally considered long when they occur at the end of a line, the vowels that appear short in their written form also rhyme with their corresponding long vowels. For this reason, it is the pronunciation, not the writing, that counts. 
     The letters are grouped in specific sequences called “Asoul”. A byte consists of two halves based on specific dactyl pattern forms from these Asouls. Short voweled letters (mutaharrek) are represented by (—). Arabic has three forms of vowel, which are known as Dhammah, /u/; Fathah, /a/; and Kasrah, /i/; however, in poetry meters, all of them are considered having one standard time frame. The unvoweled consonant letter is symbolized by (O). 
     Dactyls are the partitioning of words according to the meters (Wazn). They consist of the following forms: (a) one short voweled letter (Harf) followed by an unvoweled letter; (b) two short voweled letters followed by an unvoweled letter (O—); and (c) three short voweled letters followed by an unvoweled letter (O—). 
     The dactyls are grouped into known sets of metawords or forms called Tafeyyla. 
     There are seventeen types of traditional poetry meters. Dactyls come under two forms. The first one carries five consonant letters, starting with two voweled ones followed by a consonant, then a voweled consonant again before it finishes with a consonant (as in O——O————). However, the second form has seven letters, starting with one voweled consonant followed by one unvoweled consonant, then a voweled consonant, then a consonant, then two voweled consonants, and closed with a consonant. To avoid confusion in the sequel, we will refer to both poem dactyls and their Tafeyyla as “dactyls”. 
     An electronic or computerized system and method for identifying Arabic poetry meter is desirable. Thus, an Arabic poetry meter identification system and method solving the aforementioned problems is desired. 
     SUMMARY OF THE INVENTION 
     The Arabic poetry meter identification system and method is an electronic or computerized system that produces coded Al-Khalyli transcriptions of Arabic poetry. The meters (Wazn, Awzan being forms of the Arabic poems units Bayt, Abyate) are identified. A spoken or written poem is accepted as input. A coded transcription of the poetry pattern forms is produced from input processing. The system identifies and distinguishes between proper spoken poetic meter and improper poetic meter. Errors in the poem meters (Bahr, Buhur) and the ending rhyme pattern, “Qafiya,” are detected and verified. The system accepts user selection of a desired poem meter and then interactively aids the user in the composition of poetry in the selected meter, suggesting alternative words and word groups that follow the desired poem pattern and dactyl components. The system can be in a stand-alone device or integrated with other computing devices. 
     The system performs, for any line of Arabic poetry, an automatic recognition of the meter used. It produces a transcription that contains the syllabic decomposition for each hemistich of each line, as well as its metrical analysis. Errors due to the metrical scanning or to the editing of poems can be located automatically. Moreover, it allows a computerized search for formulae, word sequence of a particular dactyl pattern, and provides guidance to novel poets in balancing out their constructed poem. 
     The system and method may be embodied or carried out in a dedicated electronic device having a dedicated processor, or in a general-purpose computerized system. 
     These and other features of the present invention will become readily apparent upon further review of the following specification and drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a front view of an exemplary dedicated electronic device for carrying out an Arabic poetry meter identification method according to the present invention. 
         FIG. 2  is a partial front view of the device of  FIG. 1 , showing a typical screen display during the voice analysis mode and illustrating the Khalili transcription, the dactyls units, and poem meter, and locations for error and type of error display. 
         FIG. 3  is a block diagram of the main internal hardware components of an Arabic poetry meter identification system according to the present invention. 
         FIG. 4  shows a diagram of a 5-state HMM model structure for CV syllable analysis in an Arabic poetry meter identification system according to the present invention. 
         FIG. 5  shows a diagram of a 7-state HMM model structure for CVV and CVC syllable analysis in an Arabic poetry meter identification system according to the present invention. 
         FIG. 6  shows a diagram of a 3-state HMM model structure for unvoweled Arabic consonant analysis in an Arabic poetry meter identification system according to the present invention. 
         FIG. 7  shows a flowchart showing the main processing steps of the voice analysis and text analysis modes in an Arabic poetry meter identification system and method according to the present invention. 
         FIG. 8  is a flowchart showing the main processing steps in the learning mode in an Arabic poetry meter identification system and method according to the present invention. 
     
    
    
     Similar reference characters denote corresponding features consistently throughout the attached drawings. 
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The Arabic poetry meter identification system and method may be embodied or carried out in a dedicated electronic device having a dedicated processor, or in a general purpose computerized system having hardware and software components adapted for implementing the system and method.  FIG. 1  shows an exemplary dedicated electronic device  10  having a display, a keyboard, and a voice input signal connection. The system operates in three modes: the voice analysis mode, the text analysis mode, and the learning mode. The device  10  includes a processor, which may be a microprocessor, microcontroller, digital signature processor, application specific integrated circuit (ASIC), or other electronic processor, and associated memory for storage and execution of the operating procedure. The device  10  is intended to be used as stand-alone unit in educational classes or for personal use, or can be integrated with audio equipment or computational equipment. 
     As shown in  FIG. 1 , the device  10  may include an LCD display  200  and a keyboard  300 , or other suitable monitor and input devices. The keyboard  300  includes an Arabic keyboard  400 , diacritical keys  5  for inserting Arabic diacritical marks, four direction keys  7  for display menu selection, and menu selection keys  6 . The device  10  may be connected to an external power adapter via a power connector  13 . The digital connector  11  provides optional connectivity of the device to other computing equipment and peripherals. The device has also an audio input  9 , and audio output  14  for connection to microphone/headphones or other audio or computer equipment. Switch  101  is provided for turning the device  10  on or off, while an LED power-on indicator  12  is disposed on a highly visible portion of the device  10 . Power-on to the device  10  defaults the device  10  to a voice analysis mode. However, the user can change the default operating mode from a menu displayed on LCD display  200 . Arrows  7  can scroll up, down, left, and right through items displayed on screen  200 . When appropriate data has been selected and/or keyed in, the user can press the enter button  8  to confirm the selection/key strokes to the device  10 . 
     In the voice analysis mode, the device  10  waits for the user to start voice input through a microphone, electronic storage media (CD or DVD), or other audio input source. The device  10  records and processes the data while segmenting the input audio into a sequence of basic sound signal classes. 
     As shown in  FIG. 2 , the processor is programmed to analyze the incoming voice and print on screen  200  a single line of the Khalili transcription. In a second line the Tafyyel of the uttered verse is displayed. A third line displays the recognized meter of the poem. The device  10  can discover errors in the meter and highlights the errors on the display screen  200  by a color code, such as red or other suitable contrast color, shown in reverse video. The device  10  displays an explanation of the error in a fourth display line. As shown in  FIG. 2 , the aforementioned display sequence is repeated for each line  210  of the poem. The analysis can be saved in the memory of the device  10 , transferred to another computing device, or transferred to a printer if so equipped. During the review, the user may click on the speaker icon  205  to hear the poem line-by-line and review its corresponding analysis. 
     The sound classes segmented by the Arabic poetry meter identification device  10  include four Arabic syllabic/sub-syllabic structures. However, other syllabic and/or sub-syllabic classes may also be segmented and classified. The segmentation and classification of the speech is then transcribed into Khalili code sequence. The Khalili sequence is then grouped into dactyl and “Tafeyyl” patterns. The sequence of dactyls is then grouped into poem meters. The device  10  can detect and identify incorrect dactyls and errors in meters. The analysis modules search a table of meter classes stored in memory and identify the stored meter most closely matching the meter of the input poetry line, and pinpoint any part of Tafeyyl that does not match with the overall class. The LCD screen  200  displays the Khalili transcription, the sequence of Tafyyel, and the matching poem meter. 
     An analysis technique uses Arabic language pronunciation rules to parse a given poem text into syllabic classes. Subsequently, the syllabic patterns are used to recognize specific dactyl patterns. The dactyl patterns are then used to recognize the Arabic meter of the poem. Nonconforming parts of a verse are detected, and the quality of the poem is evaluated. The Arabic poetry meter identification system and method helps a poet by suggesting words or group of words that conform to the desired dactyl pattern and meter of the poem. 
     In the text analysis mode, the device  10  accepts user input text from a keyboard or from an external downloaded file. The text analysis uses Arabic language pronunciation rules to parse the Arabic text into a sequence of syllabic patterns, i.e., syllabic classes. In a subsequent processing stage, the syllabic patterns are used to recognize specific dactyl patterns. In a further subsequent processing stage, the dactyl patterns are used to recognize the Arabic meter of the poem. More specifically, the syllabic patterns are transcribed into a Khalili code sequence. The Khalili sequence and the syllabic sequence are then grouped into “Tafeyyl” patterns. The sequence of dactyls are then grouped into poem meters. The device  10  analyzes the text and outputs to the screen  200  a first line comprising the Khalili transcription, a second line comprising the Tafyyel of the entered poem line, and a third line comprising a display of the class name of the poem&#39;s meter. If an error is detected, a highlight, such as error  207   a , error  207   b , or error  207   c , is displayed in reverse video. The highlight may be, for example, a red color highlight of the text in error. An explanation of the error is displayed elsewhere on screen  200 . 
     The display is repeated for each line of the poem, as shown in  FIG. 2 . The analysis can be saved in the memory of the device  10  or transferred to another computing device, printer, or other output device. The device  10  can detect and identify incorrect dactyls and errors in meter. The analysis modules search a table of meter classes and identify the stored meter most closely matching the meter of the input poetry line, and pinpoint any part of Tafeyyl that does not match with the overall class. The LCD screen  200  displays the Khalili transcription, the sequence of Tafeyyl, and the matching poem meter. 
     In the learning mode, the user selects the desired meter from a menu shown on display  200 , and starts typing his poem. The device  10  analyzes the text, then produces and prints the Khalili transcription on screen  200 . In a second line the Tafyyel of the entered poem line is displayed, and in a third line the class name of the poem&#39;s meter is displayed. If an error is discovered, it is highlighted by red color, and an explanation of the error is displayed on the screen  200 . The user may then select the problem area of text highlighted by device  10 . The device  10  will then produce a new window with a list of possible words or combination of words having the proper Tafyyel, from which the user can select a suitable one in accordance with the semantics of the poem. The analysis can be saved in the memory of the device  10  or transferred to another computing device, and recalled for review and for further work. 
     In summary of the learning mode operation, the device checks the dactyl and Tafyyel of the typed text, determines whether it matches the desired one, and suggests to the user possible words or combination of words that completes the meter of the poem verse. 
     As shown in  FIG. 3 , the Arabic poetry meter identification system may be built around digital computing hardware  30 , which may include a central processing unit (CPU)  31  or other processor. The CPU  31  fetches instructions sequentially from the program memory  34  in ROM, an EPROM, or other local memory and executes them. The program memory  34  stores the detailed computational steps of the Arabic poetry meter identification method. The results of execution can be stored temporarily in a bank or more of general purpose registers  35  and RAM  37 . 
     The operating system  36  manages the execution of various tasks, and allocates RAM memories, board resources, and CPU time according to the execution priorities of various tasks. The RAM memory  37  stores the input voice, along with feature vectors of the input voice. Moreover, processed and transformed values of the feature vectors are stored in RAM memory  37 . The RAM memory  37  may comprise a plurality of volatile and non-volatile memory sections. The non-volatile memory stores the configuration parameters, the setup parameters, the accumulated values, and the identified values. The volatile memory stores the current values, status values, and limited historical values for periodic reporting to a host computer if needed. 
     The execution timing of device  10  is determined by a master CPU clock oscillator  38 . The timers  39  are used for setting up the sampling periods and analysis frame lengths. 
     The Analog-to-Digital A/D unit  32  converts the speech signal present on the analog input channels to digital words at a specified sampling rate. The analog output channel is used to send the recorded speech to other systems or to a headphone during review. 
     The CPU  31  is internally connected to a number of digital input/output registers  40 , which interface external devices via the digital I/O channels  41  and  42 . The I/O digital channel  41  is connected to the keyboard  300 . The digital I/O channel  42  interfaces the control board of digital computing hardware  30  to the device display unit  200 . The device may be connected to other computing devices or peripheral devices via the high speed ports  45 , and the high speed communication links  47 . The high speed ports  45  implement one or more communication bus and protocol, which could be a local area network, wireless communication, or a high speech serial USB port. 
     It will be understood that the block diagram of  FIG. 3  is exemplary only, and may be embodied in a dedicated electronic device having a microprocessor, microcontroller, digital signal processor, application specific integrated circuit, or other device that combines several of the circuits onto a single chip programmed solely to carry out the method steps described herein, or may be embodied in a general purpose computer having the appropriate peripherals attached thereto and software stored on a computer readable media that can be loaded into main memory and executed by the processing unit  31  to carry out the steps of the method described herein. 
     Recognition of the acoustic units in the Arabic poetry requires similar techniques as those used in modern speech recognition. While in speech recognition, the aim is to identify the speech words and sentences, the Arabic poetry meter identification method identifies the syllabic patterns of the poem speech to produce speech-to-Khalili transcription of the poetry. Moreover, the method carried out by device  10  identifies the meters, i.e., Awzan forms of the Abyate. 
     Although the procedure in this embodiment uses mathematical modeling techniques similar to those used in related art phoneme recognition automatic speech recognition (ASR) systems, the method steps have models that directly recognize specific syllabic patterns structures in Arabic poems. Moreover, the method steps provide recognition models that identify the meter of a spoken Arabic poem. Accordingly, the method is substantially more efficient and more accurate in directly recognizing the meters of Arabic poems. 
     The Arabic poetry meter identification method receives a vocal or audio rendition of the poem and processes it by a series of computer programming algorithms to identify the Arabic poem meter, detect poetry metrical errors committed by the users, and evaluate the accuracy of the meter. The Arabic poetry meter identification method applies mathematical modeling techniques, which are similar, in a broad sense, to those used in speech recognition in order to identify the meter of the spoken Arabic poems. 
     While in speech recognition the aim is to recognize the uttered words and sentences and to produce the corresponding text, the aim of the disclosed invention is to identify specific syllabic and rhyme patterns in the spoken poems, and to produce the Khalyli-coded transcription of these poetry meters. Moreover, in large-vocabulary speaker-independent speech recognition, a system is trained to recognize the mathematical models of the phonemes sounds of the language, and then to use a language model to match the phoneme sequence to a sequence of words. On the other hand, the Arabic poetry meter identification system and method has mathematical template models and procedures to recognize specific classes of syllabic structures. 
     More specifically, in the disclosed embodiment, the Arabic poetry meter identification method classifies only four acoustic syllabic/subsyllabic patterns, then applies the Arabic poem meter rules to identify the dactyl structures, and then the overall meter of the entire poem, as well as the type of ending rhyme of the poem. A finite state model is applied to each meter. The model includes a statistical model for the frequency of syllables and their bigram and trigram sequences. A language model requires development of Finite State Grammar (FSG) models for the meters. In a subsequent stage, the FSG is modified to detect possible mismatches and/or identify these errors. 
     In the first mode of operation, as shown in the flowchart  700  of  FIG. 7 , the Arabic poetry meter identification method receives speech from a microphone or from some other source of recorded speech. In a preprocessing step  710 , the analog speech is first low-pass filtered and band limited to about 7.5 kHz. The speech is then sampled at 16,000 samples per second. In a feature extraction step  712 , the speech samples are grouped in windows of 25.6 msec (about four hundred ten samples), having consecutive frames that overlap by ten milliseconds. Each window is pre-emphasized and is multiplied by a Hamming window. The basic feature vector uses the Mel Frequency Cepstrum Coefficients MFCC. The MFCCs are obtained by taking the Discrete Cosine Transform (DCT) of the log power spectrum, S k , k=1, 2, . . . , K from Mel spaced filter banks. We can then calculate the MFCC&#39;s, x(n) as: 
     
       
         
           
             
               
                 x 
                 ⁡ 
                 
                   ( 
                   n 
                   ) 
                 
               
               = 
               
                 
                   1 
                   L 
                 
                 ⁢ 
                 
                   
                     ∑ 
                     
                       k 
                       = 
                       1 
                     
                     
                       k 
                       = 
                       K 
                     
                   
                   ⁢ 
                   
                     
                       ( 
                       
                         log 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           S 
                           k 
                         
                       
                       ) 
                     
                     ⁢ 
                     
                       cos 
                       ⁡ 
                       
                         [ 
                         
                           
                             n 
                             ⁡ 
                             
                               ( 
                               
                                 k 
                                 - 
                                 0.5 
                               
                               ) 
                             
                           
                           ⁢ 
                           
                             π 
                             K 
                           
                         
                         ] 
                       
                     
                   
                 
               
             
             , 
             
               
 
             
             ⁢ 
             
               n 
               = 
               1 
             
             , 
             2 
             , 
             … 
             ⁢ 
             
                 
             
             , 
             L 
           
         
       
     
     Thirteen cepstrum coefficients are calculated. The base feature vector, x i (k) 1≦k≦12 uses 12 coefficients. 
     The basic feature vector is usually normalized by subtracting the mean over the sentence utterance. x(0) represents the log mel spectrum energy, and is used to derive other feature parameters. The basic feature vector is highly localized. To account for the temporal properties, three other derived vectors are constructed from the basic MFCC coefficients: a 40-ms and 80-ms differenced MFCCs (24 parameters), a 12-coefficient second order differenced MFCCs, and a 3-dimensional vector representing the normalized power (log energy), differenced power, and second-order differenced power. In an alternative design, between three and seven consecutive basic features are used as input to a neural network, as it will be explained in the Arabic syllables models. 
     The sound units considered here are three syllabic units, and the unvoweled Arabic consonants are referred to as CV, CVV, CVC, and C, where C is a consonant and V is a short vowel. These acoustic units are modeled by Hidden Markov Models (HMM) of five states, seven states, seven states, and three states, respectively. A large acoustic database of the Arabic poems is used to form the parameters of these models. The model parameters include the transition probabilities and the emission probabilities of the models. 
     The HMM-based technique comprises recognizing speech by estimating the likelihood of each phoneme at contiguous, small frames of the speech signal. Words in the target vocabulary are modeled into a sequence of phonemes, and then a search procedure is used to find, among the words in the vocabulary list, the phoneme sequence that best matches the sequence of phonemes of the spoken word. 
     Each phoneme is modeled as a sequence of HMM states. In standard HMM-based systems, the likelihoods (also known as the emission probabilities) of a certain frame observation being produced by a state is estimated using traditional Gaussian mixture models or by an artificial neural network (ANN). 
     In speech recognition the technique is usually based on modeling of the phoneme sounds. However, in the Arabic poetry meter identification method, recognition of the syllabic patterns and the recognition of the rhythm created by the patterns in the poem are focused on. 
     The device  10  contains templates and statistical models  714  representing short Arabic syllables of the form CV, CVV, CVC, and the subsyllable C, where C is a consonant and V is a short vowel. The CV models are represented by the Hidden Markov Model (HMM) models  400 ,  500 , and  600  for the CV, CVV &amp; CVC, and C, as shown in  FIGS. 4 ,  5 , and  6 , respectively. An HMM model, λ, is completely specified by the following parameters: the number of states, N; the state transition probabilities, A, a ij =P(s t+1 =j|s t =i), are the transition probability from state I to state j, where s t  is the state at time t; the observation symbol probability, bj, b j (x t )=P(x t |s t =j), where x t  is the observation at time t; and the initial state probabilities, Π, π i =P(s 1 =i). 
     The HMM model parameters can be computed using a corpus of spoken Arabic poems and the HMM model building tools, which are available free from Cambridge University. The numerical values of these model parameters can statistically vary, depending on the size of the available corpus of spoken poems, the feature vectors, and the sampling rate. The parameters of the HMM models are stored in tables coded in the device  10 . The structure comprises three emitting states and two non-emitting states for the unvoweled consonants, as shown in model  600  of  FIG. 6 . Five emitting states and two non-emitting states are allocated to the CV syllables, as shown in model  500  of  FIG. 5 . Seven emitting states and two non-emitting states are allocated to the CW or the CVC syllables, as shown in model  400  of  FIG. 4 . Other HMM structures or combinations of HMM and Neural Networks may also be used for modeling the syllables. 
       FIG. 7  illustrates the procedure steps for the voice analysis mode of the Arabic poetry meter identification system. The voice may be entered from a microphone. The speech passes through a preprocessing step, where it is low pass filtered, band limited, and level adjusted. The speech is then sampled and grouped into analysis windows, and the features for each corresponding frame are obtained as explained above. The spoken poem is divided into verses. 
     In steps  714  and  716 , syllabic statistical models are provided as input to a Viterbi algorithm to compute the likelihood of syllables at contiguous frames of the speech signal. At step  718 , a syllabic segmentation procedure finds the syllable sequence that best matches the sequence of the spoken poem. At step  720 , the syllabic segmentations are used to generate a Khalili transcription. The CV syllable is replaced by “——”. The long vowel and the CVV syllables are replaced by “O——”, and the unvoweled consonants are represented by “O”. 
     At steps  722  and  724 , the Khalili transcription is grouped into a sequence of dactyls (Taffyye Segmentation) from a table (Dactyl Lexicon). The dactyl sequences are searched to find the best sequence of dactyls that matches the sequence of syllables or the Khalili code. In step  728 , the sequence of dactyls is grouped into meters. In step  726 , the meter-grouped dactyl sequence is searched to find the meter that most closely matches the sequence of dactyls. The list of dactyls contains the correct dactyls, which may be printed at step  732 , and possible faulty ones at step  730 . It should be understood that, in lieu of audio, step  734  may be utilized to provide a syllabic transcription from text input (TEXT) to the device  10 . Step  736  produces a Khalili transcription from the text to syllabic transcription. 
     The matching process can then detect if the highest scored pattern contains illegal dactyls. The meter table may also contain correct and incorrect meters. An exemplary displayed analysis is shown in  FIG. 2 . The first line of lines  210  displays a single line of the poem. The second line of lines  210  displays the Khalili transcription. The third line of lines  210  displays the dactyl transcription. If an error is detected, the wrong dactyl  207   a  is highlighted, and an explanatory message  207   c  is displayed in the display  200 . The explanatory message may also be included in a voice message. 
     As shown in  FIG. 7 , the text analysis mode allows the user to enter a verse of a poem. The poem may also be previously saved in the device memory, or obtained from another computing device. A text to syllable procedure unit  734  converts the text into corresponding syllables using an algorithm known by persons having ordinary skill in the art. The syllables are classified into a sequence of the four aforementioned syllable classes. The syllabic segmentations are used to generate the Khalili transcription. The Khalili transcription is grouped into a sequence of dactyls from a table. A fourth search algorithm is used to find the best sequence of dactyls that matches the sequence of syllables or the Khalili code. The sequence of dactyls is again grouped into meters. A fifth search algorithm is used to find the meter that best matches the sequence of dactyls. The list of dactyls contains the correct dactyls and possible faulty ones. The matching process can then detect if the highest scored pattern contains illegal dactyls. The meter table may also contain correct and incorrect meters. 
     In the learning mode, shown in  FIG. 8 , the user enters the text of a line of poem, or a part of the line. The text to syllabic transcription takes place at step  810 , the Khalil transcription being performed at step  812 . The Taffye segmentation occurs at step  814 . A meters table  818  is used as input to a Buhur matching process that is performed at step  816 . If a match occurs, the Bahr class is printed/displayed at step  820 . If there is no metric (Buhur) matching, an error is registered at step  826 . The error registration triggers a dactyl suggestion procedure at step  822 . The dactyl suggestion procedure utilizes Tafyyelat tables and database  824  as input to formulate the dactyl suggestion. The suggested dactyl is fed-back to the text to syllabic transcription process at step  810 . 
     As shown in  FIG. 2 , the text will appear on the first line of lines  210  within display screen  200 . The device  10  analyzes the text and produces and prints on screen  200  the Khalili transcription on a second of display lines  210 . A third line of display lines  210  shows the Tafyyel of the entered poem line. 
     A fourth line of display lines  210  shows the class name of the meter of the poem. If an error is discovered, the error item is highlighted by an indicator  207   a ,  206   b , or  207   c . The indicator may be an exemplary red color, or the like. An explanation of the error is presented in the display  200 . The user may then select the problem area of his text. The device  10  will then produce a new window with a list of possible words or combination of words having the proper Tafyyel, from which the user can select a suitable one in accordance with the semantics of the poem. The analysis can be saved in the memory  34  of the device, or transferred to another computing device and recalled for review and for further work. 
     It is to be understood that the present invention is not limited to the embodiment described above, but encompasses any and all embodiments within the scope of the following claims.