I need to extract the source and destination terms from the text documents using text mining / NLP / Information Retrieval ?

Example input:

  1. I am travelling from New York to London.
  2. I am heading towards playground from home.
  3. I will be going to Sweden from Boston.
  4. I was flying from School to Home.

The output can be as follows :

S. No. |  source    | Destination
------ |  ----------|------------
      1| New York   | London
      2| playground | home
      3| Sweden     | Boston
      4| School     | Home

1 Answer 1


Named Entity Recognition is technique which can be used here. Location is one of the 3 most studied classes (with Person and Organization). Stanford NLP has an open source Java implementation that is extremely powerful.

For Example let say sentence is "i will be going to Sweden from Boston." Stanford NER Demo

Now here you can use regular expression to detect these LOCATION tags.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.