fgungor
fgungor

Reputation: 489

Algorithm for computing the relevance of a keyword to a short text (50 - 100 words)

I want to compute the relevance of a keyword to a short description text. What would be the best approach in terms of efficiency and ease of implementation. I am using C++?

Upvotes: 5

Views: 2715

Answers (2)

moinudin
moinudin

Reputation: 138317

Simple solution: Count the occurrences of the word in the text.

To do a good job though is a hard problem that companies like Google have been working on for years. If possible, you might want to take a look at using their technology

To expand, try the following:

That's still only going to get you so far. You'll need to perform some natural language processing to truly understand what the description is about to distinguish between multiple texts containing the keyword the same number of times.

Upvotes: 6

Related Questions