I want to construct a Term-Document matrix in python for Arabic language, I used CountVectorizer(), but it gives the documents in the column, and terms in the row. I want the terms to be in columns and documents in rows, I tried to transpose the matrix, but it gives wrong values, here is the code that i have used.
corpus = [ 'القدرة على التفكير و الحل', 'القدرة على التعلم و القدرة على التفكير في المسائل', 'القدرة على التعلم في حل المسائل']
vectorizer = CountVectorizer()
X = vectorizer.fit_transform(corpus)
v = X.toarray()