<p>For flexibility in measuring the semantic similarity of very specific terms like Dehli or Hyderabad, what you want is not something hand-crafted like WordNet, but an <em>automatically-learned</em> similarity measure from a <em>very large database</em>. These are <a href="https://en.wikipedia.org/wiki/Semantic_similarity#Statistical_similarity" rel="nofollow">statistical similarity</a> approaches. Of course, you want to avoid having to train such a model on data yourself...</p>

<p>Thus one thing that may be useful is the Google Distance (<a href="https://en.wikipedia.org/wiki/Normalized_Google_distance" rel="nofollow">wikipedia</a>, <a href="http://arxiv.org/pdf/cs/0412098.pdf" rel="nofollow">original paper</a>). It seems fairly simple to implement such a measure in a language like R (<a href="https://ryouready.wordpress.com/2009/01/12/r-normalized-google-distance-ngd-in-r-part-ii/" rel="nofollow">code</a>), and the original paper reports 87% agreement with WordNet.</p>
wordnet on different text?
<p>I am new to <code>nltk</code>, and I find wordnet functionality pretty useful. It gives <code>synsets</code>, <code>hypernyms</code>, <code>similarity</code>, etc. But however it fails to give similarity between locations like 'Delhi'-'Hyderabad' obviously as these words are not in the wordnet corpus.</p>

<p>So, I would like to know, if somehow I can update the wordnet corpus OR create wordnet over a different corpus e.g. Set of pages extracted from wikipedia related to travel? If at all we can create wordnet over different corpus, then what would be the format, steps to do the same, any limitations?</p>

<p>Please can you point me to links that describe the above concerns. I have searched the internet, googled, read portions of nltk book, but I don't have a single hint to above question.</p>

<p>Pardon me, if the question sounds completely ridiculous. </p>