Re: Substituting from another file

I had resolved a similar problem some time ago by reading what
to your dictionary data into a hash (i.e., {‘PANELED’ =>‘P AE1 N AH0 L
‘PANELING’=>“P AE1 N AH0 L IH0 NG”} ).
I would then replace the keys by the values in the target text using
Cave: actually, in my application, I also had to sort my keys for
length, in
a word would be longer than another, but pronounced identically … you
can do that by iterating over an array which you get from my_hash.sort.

Best regards,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs