diff options
author | Thomas Mesnard <thomas.mesnard@ens.fr> | 2015-12-28 20:51:50 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-04-21 10:21:42 +0200 |
commit | 072d26e766931007a0f243674f7dfdff5c3104e9 (patch) | |
tree | ae3639f4ff3f8e0e3e9767c15322171aa6f2169e /edit_distance.py | |
parent | e8e37dee0c5c846b1aa2dd24dc99095191f72a9b (diff) | |
download | pgm-ctc-072d26e766931007a0f243674f7dfdff5c3104e9.tar.gz pgm-ctc-072d26e766931007a0f243674f7dfdff5c3104e9.zip |
Add plot
More TIMIT ; log domain
TIMIT: more complexity
Nice poster
Beautify code (mostly, add comments)
Add final stuff.
Diffstat (limited to 'edit_distance.py')
-rw-r--r-- | edit_distance.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/edit_distance.py b/edit_distance.py index d76cc00..6c118e8 100644 --- a/edit_distance.py +++ b/edit_distance.py @@ -8,6 +8,10 @@ def batch_edit_distance(a, a_len, b, b_len): B = a.shape[0] assert b.shape[0] == B + for i in range(B): + print "A:", a[i, :a_len[i]] + print "B:", b[i, :b_len[i]] + q = max(a.shape[1], b.shape[1]) * numpy.ones((B, a.shape[1]+1, b.shape[1]+1), dtype='int32') q[:, 0, 0] = 0 |