python - How to tell scikit-learn vectorizer use specific features? -


I have a set of features - these are not all the same words above the hand; Some of them are elderly and some others are tragrams. I want to prepare my own texts - which are clearly made available in the form of raw texts based on these characteristics, how can I do this in scalin? In this way I have defined my vector so far. Import from sklearn.feature_extraction.text CountVectorizer vectorizer = CountVectorizer (ngram_range = (1, 3)) back vector size

countvatiser and TfIdfVectorizer allows you to specify the terminology to use For them, give them as keyword logic in the form of glossary glossary : mapping or alternative, optional

either Mapping (e.g., A Word) where the key words and values ​​are not given if a notch, according to the feature indices matrix, or conditions, is defined a vocabulary of input documents.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -