Hi, what would be the best approach to implement some UDFs on ONE DATA for data transformation?
I have for example this function:
# Longest common subsequence function (calculates similarity index for two words) def lcs(a, b): minlength = min(len(a), len(b)) table = [ * (len(b) + 1) for _ in range(len(a) + 1)] for i, ca in enumerate(a, 1): for j, cb in enumerate(b, 1): table[i][j] = ( table[i - 1][j - 1] + 1 if ca == cb else max(table[i][j - 1], table[i - 1][j])) return table[-1][-1] / minlength
I as a OD user would like to use this function in a flexible way, i.e. I don’t want to copy, paste and adapt it in every python processor every time I need it.
Is there anybody with experience in OD Functions and could this feature help my use case?