In response to a query, web search tools often return many websites which are not really relevant. One reason for this is that the queried word may have several meanings different to the one which the user has in mind. To eliminate these undesirable meanings, it is reasonable to look for occurrences not only of the queried word itself, but also for other words related to this particular meaning, and then select only the websites for which, based on this information, we are confident about their relevance. For this strategy to work, we must be able to estimate the degree of relevance d of a website based on the number of occurrences N of given word. In this paper, we describe the optimal model for the dependence d(N).