shadowtube/examples/inner_test.py
2025-02-17 20:08:35 +01:00

22 lines
574 B
Python

import shadowtube.preprocess as prep
import shadowtube.recommend as rec
raw_history = prep.parse_database("./short.db")
# print(raw_history[0]["title"] + ": " + str(prep.relevancy(raw_history[0], raw_history)))
# print(
# raw_history[28]["title"] + ": " + str(prep.relevancy(raw_history[28], raw_history))
# )
# for i in range(0, 10):
# print(prep.get_similarity(raw_history[i], raw_history))
history = prep.sort_history(raw_history)
print(len(history))
# print(recommend(history))
recommendations = rec.recommend(history, verbose=False)
print(recommendations)