]> code.communitydata.science - cdsc_reddit.git/blobdiff - similarities/cosine_similarities.py
Merge remote-tracking branch 'origin/excise_reindex' into temp
[cdsc_reddit.git] / similarities / cosine_similarities.py
index 0c9c986c3e60ff28224f1eaed0072453af5d2948..8b856925fe3b7d28cdaae796977eab5c643185b6 100644 (file)
@@ -4,9 +4,9 @@ from pathlib import Path
 from similarities_helper import similarities, column_similarities
 from functools import partial
 
-def cosine_similarities(infile, term_colname, outfile, min_df=None, max_df=None, included_subreddits=None, topN=500, exclude_phrases=False, from_date=None, to_date=None, tfidf_colname='tf_idf'):
+def cosine_similarities(infile, term_colname, outfile, min_df=None, max_df=None, included_subreddits=None, topN=500, from_date=None, to_date=None, tfidf_colname='tf_idf'):
 
-    return similarities(infile=infile, simfunc=column_similarities, term_colname=term_colname, outfile=outfile, min_df=min_df, max_df=max_df, included_subreddits=included_subreddits, topN=topN, exclude_phrases=exclude_phrases,from_date=from_date, to_date=to_date, tfidf_colname=tfidf_colname)
+    return similarities(infile=infile, simfunc=column_similarities, term_colname=term_colname, outfile=outfile, min_df=min_df, max_df=max_df, included_subreddits=included_subreddits, topN=topN, from_date=from_date, to_date=to_date, tfidf_colname=tfidf_colname)
 
 # change so that these take in an input as an optional argument (for speed, but also for idf).
 def term_cosine_similarities(outfile, min_df=None, max_df=None, included_subreddits=None, topN=500, exclude_phrases=False, from_date=None, to_date=None):
@@ -18,7 +18,6 @@ def term_cosine_similarities(outfile, min_df=None, max_df=None, included_subredd
                                max_df,
                                included_subreddits,
                                topN,
-                               exclude_phrases,
                                from_date,
                                to_date
                                )
@@ -31,7 +30,6 @@ def author_cosine_similarities(outfile, min_df=2, max_df=None, included_subreddi
                                max_df,
                                included_subreddits,
                                topN,
-                               exclude_phrases=False,
                                from_date=from_date,
                                to_date=to_date
                                )
@@ -44,7 +42,6 @@ def author_tf_similarities(outfile, min_df=2, max_df=None, included_subreddits=N
                                max_df,
                                included_subreddits,
                                topN,
-                               exclude_phrases=False,
                                from_date=from_date,
                                to_date=to_date,
                                tfidf_colname='relative_tf'

Community Data Science Collective || Want to submit a patch?