Spaces:
Runtime error
Runtime error
Download scripts/utils/tf_idf.py from marchji2415/resumematcher: direct link, hf CLI and curl.
- Browser
- Download file 248 Bytes
-
https://huggingface.co/spaces/marchji2415/resumematcher/resolve/main/scripts/utils/tf_idf.py
- Command line
-
hf download hf://spaces/marchji2415/resumematcher/scripts/utils/tf_idf.py
-
curl -L -o tf_idf.py https://huggingface.co/spaces/marchji2415/resumematcher/resolve/main/scripts/utils/tf_idf.py
248 Bytes
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| def do_tfidf(token): | |
| tfidf = TfidfVectorizer(max_df=0.05, min_df=0.002) | |
| words = tfidf.fit_transform(token) | |
| sentence = " ".join(tfidf.get_feature_names()) | |
| return sentence | |