This code is used by wlvsimilarity package.