Hello Monks,
yet another problem on which I need your advice.
I am trying to use the Text::Levenshtein module authored by Dree Mistrut from CPAN, to calculate the Levenshtein distance between two strings.
I could of course email the author, but I thought I would post it here too.
The module seems to work with
ASCII strings e.g the following strings in the Times New Roman font(ascii)
test
tent
distane:1
But I need to work with a font for another language(Not English). I need to work with the AS-TTDurga font for Assamese which uses
ISCII encoding.
So my ISCII strings would look like this if I set the font
to Times New Roman (I compose my ISCII text in a word processor that supports the AS-TTDurga font,save as text in say in a Notepad file.)
]»
]»]»
distance:0
When I use this module for any two ISCII strings, I keep
getting distance between the strings=0 which is not the result I need.
In the AS-TTDurga font, a single letter(vowel/consonant), may sometimes be mapped to two or more ascii characters, e.g.
letter a in my font = ascii chars sd
letter b in my font = ascii chars !#
So for the string ab, I would have sd!# in my text file.
How do I get this module to work? (Please bear with my ignorance.)Or, if I need to write my own code to calculate the distance between the strings, how do I go about it?
Please help!
perl_seeker:)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.