Sunday, September 9, 2012

MS - Thesis Algorithem


The Closest meter by Pattern

Boolean Procedure ClosestMeterByPattern
           
            Set PrevMismatchPointCount to -1
    Do while meter list is traversed
Set MismatchPointCount to 0

  Do while all syllables in the verse are traversed
                        If (weight of syllable is not same as corresponding weight of this meter)
                                    Set MismatchPointCount = MismatchPointCount + 1
                                    break  
                         End If
                          If (weight of syllable is ‘x’)
continue                     
                          End If
                End Do                  
           

If(PrevMismatchPointCount == -1 or PrevMismatchPointCount > MismatchPointCount)
             ClosestMeter = MeterCount  
             PrevMismatchPointCount = MismatchPointCount
             End If                                   

  Set MeterCount to 1 + MeterCount  
           
      End Do    





















Problem Area according to the closest meter by pattern

Boolean Procedure printProblemAreas
           
            Array

               Do while all syllables in the verse are traversed
            If (weight of syllable is not same as corresponding weight of closest meter)
                                    Print the syllable index
                         End If
                          If (weight of syllable is ‘x’)
continue                     
                          End If
    End Do                  
                 



The Closest meter by Size

Boolean Procedure ClosestMeterBySize
           
            Set PrevDiff = -1
            Set MeterCount = 1
            Do while meter list is traversed
Diff = Difference(VerseSyllableSize, MeterWeightSize)

If(PrevDiff == -1 Or PrevDiff>Diff)
   PrevDiff = Diff
   ClosestMeter = MeterCount
End If

Set MeterCount to 1 + MeterCount  

           End Do           

            Retrun MeterCount

No comments:

Post a Comment