I need help to find (almost matching) records (1 Viewer)

Randy1

New member
Local time
Today, 06:25
Joined
Mar 19, 2023
Messages
2
Im trying to build a rhyme tool for a language which is "orthographic" (This means that the way a word is spelled corresponds directly to its pronunciation)
I already have a database of many words of my language. and I have found a way to separate each word into it's individual letters. (sounds)
so in my database, each word is written like this:
FieldWord: Word
Field1: W
Field2: o
Field3: r
Field4: d

The purpose of this database will be to have a search field which brings up rhyming words. But not just simple rhymes.
I want to write for example (Manage) and the database brings up (Carnage).
The letters a,n,a,g,e match but they are in different positions in the word
for manage, ( n ) is the 3rd letter. but for Carnage, ( n ) is the 4th letter.

My issue is that I can't find a way to bring up all words that are similar in SOME fields.
they can't be completely the same. but they can't be just matching in 1 letter neither.

Does anyone know how I can achieve this? Many thanks :)
 
Hi. Welcome to AWF!

First thing I would try is "normalize" your table to store the letters in a child table. Maybe that would help solve your problem.
 
Hi. Welcome to AWF!

First thing I would try is "normalize" your table to store the letters in a child table. Maybe that would help solve your problem.
Thank you very much ^^

I don't see how creating a child table would help. can you explain please?
 
You might have to look into making a unicode DB in which your orthographic letters are assigned to specific unicode characters. Which, based on the way you describe it, would be phonemes. For discussion, I will use {} to enclose a phoneme but I won't use the international phonetic alphabet because off-hand I don't have a decent reference and at this time of night, I'm too lazy to do the right web search.

It might be possible to use the LIKE (comparison) operator to approach this problem so that you could match wildcard pattern * {AH} {DJ} to get {GH (hard G)}{AH}{R}{AH}{DJ} and {HH (breathy H)}{OH}{M}{AH}{DJ} = garage and homage, which would rhyme.

The next step would be trickier because if you want to allow imperfect matches, you would have to come up with weight-based scoring depending on how close you want the rhyme to be. In THAT case, you will need to have a forward-reading comparison scheme and a backward-reading comparison scheme and a matrix of whether you could count two letters (e.g. {GH} and {DJ}, hard and soft G) as matching, and if so, how close.
 
sample of Levenshtein fuzzy match (see form1).
 

Attachments

A very simple approach, related to letters and equality of letters:
SQL:
SELECT
   T1.Word,
   T2.Word AS X
FROM
   YourTable AS T1,
   YourTable AS T2,
   (
      SELECT
         I
      FROM
         T999
      WHERE
         I BETWEEN 3 AND 10
   ) AS T
WHERE
   T1.Word LIKE "*" & Right(T2.Word, T.I)

T999 is a table with a column I containing the numbers from 0 to 999 (my standard number help table).
 
Last edited:
For rhyming, you care about the word ending. So match from the back to the front.
 
 

Users who are viewing this thread

Back
Top Bottom