Algorithm 1.
Match Generation Algorithm
| 1: | Input: input_headers, output_headers, simMatrix |
| 2: | Output: matches |
| 3: | matches ← empty list |
| 4: | for all input ∈ input headers do |
| 5: | MATCHINPUT(input, matches) |
| 6: | end for |
| 7: | return matches |
| 8: | |
| 9: | procedure MATCHINPUT(input, matches) |
| 10: | ops ← output headers with similarity values >= 0.5 |
| 11: | sort ops by descending similarity value |
| 12: | for all output ∈ ops do |
| 13: | sim ← simMatrix[input][output] |
| 14: | currMatch ← [input, output, sim] |
| 15: | if output is not already matched then |
| 16: | matches.add(currMatch) |
| 17: | return |
| 18: | else |
| 19: | find prevMatch of output from matches |
| 20: | if prevMatch.sim < currMatch.sim then |
| 21: | matches.add(currMatch) |
| 22: | matches.remove(prevMatch) |
| 23: | MATCHINPUT(prevMatch.input, matches) |
| 24: | return |
| 25: | end if |
| 26: | end if |
| 27: | end for |
| 28: | return |
| 29: | end procedure |