I was just wondering, Is there any possibility that we train neural networks (may be LSTM
/RNN
) on different formats of dates (with multiple examples in each format to expand its learning) and then ask the neural net to extract a close match of date in a RAW TEXT
?
All I need is a Machine learning
algorithm to do pattern matching
instead of using regex
. Can this be implemented?
If so, Please provide me an idea of implementation or any already working solution (Python
/R
) is also fine.
Update: Added my problem statement for better understanding
My Input text file (input.txt) with different formats of dates (Say, I have some thousands of examples for each format) will be as following: (Say, I will only be expecting these formats of data in the raw file)
13/08/1993
23/09/2016
24/12/1992
...
13-08-1993
23-09-2016
24-12-1992
...
13-Sep-1993
23-Sep-2016
24-Dec-1992
...
Some other formats
An Example RAW TEXT
file is given below: (It is just a OCR Extracted info from a receipt)
ROCKET MEALS
23/09/2015
RECEIPT ID: #294055 Shop: #1
ITEM QTY PRICE
French Fries 33.26
Coca Cola 22.4
SUB TOTAL: 95.66
Tax: + 6.45
TOTAL: 102. 1
THANK YOU - VISIT AGAIN
Expected Output: 23/09/2015
PS: I have already used regex
for this but, actually I am curious to know how to train such a network and how it understands the patterns?