Perplexity calculations; vectorizedform parameter