Now supports uneven word matrices.