views:

99

answers:

2

Hi

I need to find 1.mismatch(incorrectly played notes), 2.insertion(additional played), & 3.deletion (missed notes), in a music piece (e.g. note pitches [string values] stored in a table) against a reference music piece.

This is either possible through exact string matching algorithms or dynamic programming/ approximate string matching algos. However I realised that approximate string matching is more appropriate for my problem due to identifying mismatch, insertion, deletion of notes. Or an extended version of Boyer-moore to support approx. string matching.

Is there any link for sample java code I can try out approximate string matching? I find complex explanations and equations - but I hope I could do well with some sample code and simple explanations. Or can I find any sample java code on boyer-moore extended for approx. string matching? I understand the boyer-moore concept, but having troubles with adjusting it to support approx. string matching (i.e. to support mismatch, insertion, deletion).

Also what is the most efficient approx. string matching algorithm (like boyer-moore in exact string matching algo)?

Greatly appreciate any insight/ suggestions. Many thanks in advance

+1  A: 

here, see the first (Boyer.java) of this results page

Ville Laitila
Thanks Villelaitila. I'll check that out.Thanks for your time
Dolphin
Your link had implementations for Boyer Moore 'exact' string matching. Need to modify it out for 'approximate' string matching.Thanks
Dolphin
+1  A: 

You could start with the Wikipedia page on approximate string matching.

The problem is that this is a complex field, and simply looking at / copying some example code probably won't help you understand what is going on.

EDIT - besides, I don't see how Boyer-Moore would adapt to approximate string matching.

Stephen C
Thanks Stephen. Yes, I went through that in wikipedia. Was having a hard time figuring it out in code - without atleast a pseudocode. Do you have any idea on atleast some papaers or websites related to modified boyer-moore for approx. string matching algo.? Thanks for your time
Dolphin
Boyer-Moore is an exact string matching algorithm. It can be modified to support approximate string matching. I even found a few papers and resources on that. Once adjusted to support approx. string matching it's similar to Boyer-Moore-Horspool algorithm. Thanks
Dolphin