I'm trying to develop a python algorithm to check if a string could be an abbrevation for another word. For example
fckis a match forfc kopenhavnbecause it matches the first characters of the word.fhkwould not match.fcoshould not matchfc kopenhavnbecause no one irl would abbrevate FC Kopenhavn as FCO.irlis a match forin real life.ifkis a match forifk goteborg.aikis a match forallmanna idrottskluben.aidis a match forallmanna idrottsklubben. This is not a real team name abbrevation, but I guess it is hard to exclude it unless you apply domain specific knowledge on how Swedish abbrevations are formed.manuis a match formanchester united.
It is hard to describe the exact rules of the algorithm, but I hope my examples show what I'm after.
Update I made a mistake in showing the strings with the matching letters uppercased. In the real scenario, all letters are lowercase so it is not as easy as just checking which letters are uppercased.