I am trying to make a program which customize ads based on your search history.
therefore, I need an algorithm / script that find the best keyword of Ad that will be adjusted to the specific person, based on the frequency of the word in the searches and the time elapsed from that search.
for example,
if my search list is :
how to find the main word of sentence - 2018-03-31 15:16:04.752350
main word of sentence - python - 2018-03-28 15:16:04.752350
food of dogs - 2016-03-28 15:16:04.752350
- dogs and their food - 2016-03-25 15:16:04.752350
- dog's food - 2016-03-23 15:16:04.752350
so even though dog, food is apearing 3 times and main word of sentence only 2 , due to the fact that has been pass along time since the user searched for dog's food, the topic that would be choose is - main word of sentence.
So far I have done some algorithms that find the main topic of sentence, without cosidering the time that pass. But, unfrotuently, as I said, i need an algorithm based on time. I tought about simple ideas like multipication recently search score of “good” by constant but i want better algorithm.
Thanks alot,
Omer