Extracted TokenVectorSpace class.