Back in 2013, Mozilla Labs had been experimenting with a similar idea, a feature called "User Personalization" (UP). It was an API that get web content access to (user-controlled) user interest keywords, but AFAIK nothing came of the project.
EDIT: Looks like the "Firefox Interest Dashboard" add-on is a more recent exploration of this idea, letting you explore the categorization of your own local browsing history: