0
$\begingroup$

suppose i have text file with invoice details in it . I want to extract only some information based on my certain condition such as Mobile - 25,000 and quantity - 1 i want to extract only mobile and quantity based information and store it in text file.Can someone give me an idea how to do this.

$\endgroup$
  • $\begingroup$ i have .txt file which i need to extract information . $\endgroup$ – sharath Apr 1 '20 at 5:45
  • $\begingroup$ i know that it can be done using information extraction techniques in NLP how to do it i dont know can someone specify the link here. $\endgroup$ – sharath Apr 1 '20 at 5:47
  • $\begingroup$ NLP is using a sledgehammer to squash a fly in this case. Use regex as suggested below. $\endgroup$ – Dave Kielpinski Apr 2 '20 at 2:02
1
$\begingroup$

You might be looking for regex. With this you can parse the text based on your specified search patterns.

Some info: https://en.wikipedia.org/wiki/Regular_expression

With python you can follow this documentation in order to build your regex expressions: https://docs.python.org/3.8/library/re.html

$\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.