Kmeans cluster validation when I have labeled test data
In order to keep the same dimension for both training &amp; testing set, you need apply your fit on the training set with you tokenization, tf-idf etc..
You need to apply same treatments as you do on training, on the testing set and then this will be okay :

from sklearn.feature_extraction.text import CountVectorizer

corpus_train = [
    'This is the first document.',
    'This document is the second document.'
]
corpus_test = [
    'And this is the third one.',
    'Is this the first document?',
]

vectorizer = CountVectorizer()
X_train = vectorizer.fit_transform(corpus_train)
print(vectorizer.get_feature_names())

# Returns
['document', 'first', 'is', 'second', 'the', 'this']


So your training set looks like this : 

print(X_train.toarray())
# Returns
[[1 1 1 0 1 1]
 [2 0 1 1 1 1]]

print(X_train.shape)
# Returns
(2, 6)


Then just transform your testing set with the same vectorizer : 

X_test = vectorizer.transform(corpus_test)
print(X_test.toarray())
# Returns 
[[0 0 1 0 1 1]
[1 1 1 0 1 1]]

print(X_test.shape)
# Returns
(2, 6)


So you get your dimension of 6 (the number of features) for both training &amp; testing set :)