Back ported transposition detector API improvement from Vectorspace
branch to master branch.