Answers.Body: <p>If the text is really that regular, you can do simple pattern matching: Search for the keywords &quot;limit of liability&quot;, &quot;deductible&quot;, and &quot;sum insured&quot;. The take the next numerical value (possibly preceded by &quot;INR&quot;), and assign it to the corresponding value.</p>
  <p>However, this is very simplistic and brittle, and will fail if the texts are more varied. You might still get quite far with it, and you can always add more variations of the keywords to it.</p>
  <p>Note that I would not advise that for general text analysis, as it's far too primitive.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-29T14:53:58.803Z
Answers.LastActivityDate: 2021-03-29T14:53:58.803Z
Answers.UserDisplayName: Oliver Mason
Body: <p>I am trying to read a PDF file and put it in Python string and trying to fetch information based on keywords. The text here is completely irregular.</p>
  <p>Example of text</p>
  <blockquote>
  <p>Blockquote
  Ram has taken an insurance of his premises with total sum insured of INR 256,200,000,000. XYZ company provides an insured with limit of liability of INR 100,250,000 and 90 days indemnity period. Insured with deductible of INR 200,000.</p>
  </blockquote>
  <p>Here I want to find 3 things from this text</p>
  <ul>
  <li>limit of liability amount</li>
  <li>Deductible amount</li>
  <li>Sum insured amount</li>
  </ul>
  <p>For example</p>
  <p>Limit of liability  = 100,250,000</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-29T10:27:40.727Z
Comments.Text: What is your **specific** question? What have you tried so far?
Comments.UserDisplayName: nbro
Tags: <natural-language-processing><recurrent-neural-networks><natural-language-understanding>
Title: Extracting values from text based on keywords
UserDisplayName: Parnav
ThreadText: # Extracting values from text based on keywords
  
  (Asked by: username_0 on 2021-03-28)
  
  I am trying to read a PDF file and put it in Python string and trying to fetch information based on keywords. The text here is completely irregular.
  
  Example of text
  
  > Blockquote
  > Ram has taken an insurance of his premises with total sum insured of INR 256,200,000,000. XYZ company provides an insured with limit of liability of INR 100,250,000 and 90 days indemnity period. Insured with deductible of INR 200,000.
  
  Here I want to find 3 things from this text
  
  * limit of liability amount
  * Deductible amount
  * Sum insured amount
  
  For example
  
  Limit of liability = 100,250,000
  
  **Tags:** natural-language-processing, recurrent-neural-networks, natural-language-understanding
  
  > **Comments:**
  > **username_1**: What is your **specific** question? What have you tried so far?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-03-29. Score: 0
  
  If the text is really that regular, you can do simple pattern matching: Search for the keywords "limit of liability", "deductible", and "sum insured". The take the next numerical value (possibly preceded by "INR"), and assign it to the corresponding value.
  
  However, this is very simplistic and brittle, and will fail if the texts are more varied. You might still get quite far with it, and you can always add more variations of the keywords to it.
  
  Note that I would not advise that for general text analysis, as it's far too primitive.
  
  
  ---
  
  