Skip to content

Commit

Permalink
Merge pull request #3373 from Utopiah/patch-1
Browse files Browse the repository at this point in the history
dynamic number of features for tf-idf
  • Loading branch information
piskvorky authored Jun 11, 2024
2 parents 26a4a8d + a2c43ab commit 795c7e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/auto_examples/core/run_core_concepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
},
"outputs": [],
"source": [
"from gensim import similarities\n\nindex = similarities.SparseMatrixSimilarity(tfidf[bow_corpus], num_features=12)"
"from gensim import similarities\n\nindex = similarities.SparseMatrixSimilarity(tfidf[bow_corpus], num_features=max(tfidf.dfs) + 1)"
]
},
{
Expand Down Expand Up @@ -274,4 +274,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit 795c7e0

Please sign in to comment.