1
$\begingroup$

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
$\endgroup$
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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