def translate(string)
      @string = string
      @max = array.length
      SoundSequence.new(array.each_index.map do |index|
        @index = index
        instance_eval(&@rules)
      end.flatten.compact)
    ensure
      @max = 0
      @string = nil
      @array = nil
      @index = nil
      @last_sound = nil
    end
def translate(string)
      @string = string
      @max = array.length
      SoundSequence.new(array.each_index.map do |index|
        @index = index
        instance_eval(&@rules)
      end.flatten.compact)
    ensure
      @max = 0
      @string = nil
      @array = nil
      @index = nil
      @last_sound = nil
    end
Translate orthorgraphy to IPA