You can use nltk
see http://www.nltk.org/book/ch01.html
search on page (verbatim) for 'pair of words and compare their usage in two different texts'
see http://www.nltk.org/book/ch01.html
search on page (verbatim) for 'pair of words and compare their usage in two different texts'