I did some experiments with Ruby and Wikipedia data, first I implemented an #ambiguous? method for articles (to check if the article links to an disambiguation page). The second idea was to implement a method to disambiguate a given sentece or paragraph by using term frequency and idf from wikipedia articles: disambiguation pages provide a set of categories and articles, a corpus is built up from articles of each category. So for a given text you may infer its category.