diff --git a/nlp/4_3_Vector_Representation.ipynb b/nlp/4_3_Vector_Representation.ipynb index e8a3e60..9eb8e9a 100644 --- a/nlp/4_3_Vector_Representation.ipynb +++ b/nlp/4_3_Vector_Representation.ipynb @@ -239,7 +239,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/cif/anaconda3/lib/python3.10/site-packages/sklearn/utils/deprecation.py:87: FutureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated in 1.0 and will be removed in 1.2. Please use get_feature_names_out instead.\n", + "--", " warnings.warn(msg, category=FutureWarning)\n" ] }, @@ -331,7 +331,7 @@ "source": [ "vectorizer = CountVectorizer(analyzer=\"word\", stop_words='english', binary=True) \n", "vectors = vectorizer.fit_transform(documents)\n", - "vectorizer.get_feature_names()" + "vectorizer.get_feature_names_out()" ] }, { @@ -365,7 +365,7 @@ "source": [ "vectorizer = CountVectorizer(analyzer=\"word\", stop_words='english', ngram_range=[2,2]) \n", "vectors = vectorizer.fit_transform(documents)\n", - "vectorizer.get_feature_names()" + "vectorizer.get_feature_names_out()" ] }, { @@ -401,7 +401,7 @@ "\n", "vectorizer = TfidfVectorizer(analyzer=\"word\", stop_words='english')\n", "vectors = vectorizer.fit_transform(documents)\n", - "vectorizer.get_feature_names()" + "vectorizer.get_feature_names_out()" ] }, { @@ -429,9 +429,9 @@ "train = [doc1, doc2, doc3]\n", "vectorizer = TfidfVectorizer(analyzer=\"word\", stop_words='english')\n", "\n", - "# We learn the vocabulary (fit) and tranform the docs into vectors\n", + "# We learn the vocabulary (fit) and transform the docs into vectors\n", "vectors = vectorizer.fit_transform(train)\n", - "vectorizer.get_feature_names()" + "vectorizer.get_feature_names_out()" ] }, {