@@ -288,8 +288,8 @@ def query_gpt_for_perturbations(
288288# Word2Vec model
289289# --------------------------------------------------------------------------- #
290290
291- # TODO: anything you want to do
292- # Improving and using better Word2Vec Models and also giving user an option to have preference on this
291+ # TODO: Improving and using better Word2Vec Models and also giving user an option
292+ # to have preference on this
293293
294294def load_google_news_vectors ():
295295 # First try gensim downloader (fastest & simplest)
@@ -339,11 +339,11 @@ def clean_text(text: str) -> str:
339339 cleaned = re .sub (r"[^\w\s]" , "" , text .lower ())
340340 return cleaned .strip ()
341341
342- # TODO: anything you want to do
343- # Removing the word "safe" from the function
342+ # TODO: Removing the word "safe" from the function
344343# Adding More statistical distances here
345344# As Statistical distance measures are the code for SMILE, we can consider a separate class for them.
346345
346+
347347def safe_wmdistance (model , text1 : str , text2 : str ) -> float :
348348 """Compute Word Mover's Distance using only in-vocabulary cleaned words.
349349
@@ -418,8 +418,7 @@ def normalize_similarities(wmd_scores: list) -> list:
418418# Regression
419419# --------------------------------------------------------------------------- #
420420
421- # TODO: anything you want to do
422- # This part can be extended to cover other types of LIME, like BayLIME
421+ # TODO: This part can be extended to cover other types of LIME, like BayLIME
423422
424423def fit_weighted_regression (
425424 perturbations : list ,
0 commit comments