Akshat
Akshat

Reputation: 655

Reading SMS info using NLP

I have a set of unclassified SMS messages from which I want to extract transaction related messages, then classify them on the basis of debit or credit. I will also want to extract the amount of transaction, its date and beneficiary as well.

Is there any way to approach this problem in NLP? I do not want to regexp match as my SMS database can be varied including e-wallet, cash transfer, ATM withdrawal, e-fund transfer and other such things with multiple providers.

Upvotes: 3

Views: 695

Answers (2)

Daniel
Daniel

Reputation: 6039

I agree that this is a hard problem, given the complexity the inputs generated. Here is what CogCompNLP is able to mine about your input: enter image description here

You can see that it is sensitive to dates and organizations.

a). Transaction value :- $50 b). Transaction Type :- Debit c). Time :- 18 Sep 2017 15:45 d). Pupose :- McDonald Eatery e). Final Balance :- $41276.00 f). Associated Account :- xxxxxxx1234.

What I would do is to combine a bunch of rules with these automatically extracted labels. Unfortunately there is no 100% guarantee about extraction of these labels, however if it works in 99% of your examples, then it should be reliable enough.

You can play with the demo here: http://nlp.cogcomp.org

Disclosure: I am one of the authors of this software.

Upvotes: 1

Shrikar
Shrikar

Reputation: 870

There are a couple of things you can do

  • Check spacy library which can help you with Named entity and money related extraction. I still feel that if you are talking about automated sms it might be better to use regex to extract these details.
  • I am not sure what you mean by debit or credit

Upvotes: 2

Related Questions