title: Reading from file to database prolog
body: <p><strong>Hello everyone</strong></p>
  
  <p>I have problem with part of my project for studies. 
  My task is to write a program in prolog that can tell you what illnes do you have based on input from user. Data base must be read from a file which format is up to me. </p>
  
  <p><strong>Construction:</strong></p>
  
  <p>I decide to have 2 dynamic rules;</p>
  
  <pre><code>:- dynamic (illness/2).
  :- dynamic (symptoms/4).
  </code></pre>
  
  <p>where:</p>
  
  <pre><code>illnes(name_of_illness, symptoms(symptom1, symptom2, symptom3, symptom4)
  </code></pre>
  
  <p>File: example.txt:</p>
  
  <pre><code>flu,cough,fever,head_acke, runny_nose.
  measles, rash, fever, sore_throat, inflamed_eyes.
  </code></pre>
  
  <p><strong>Problem:</strong></p>
  
  <p>My major problem is to format this data to use asserta predicat, I tried many ways but it didn't work. </p>
  
  <p><strong>Thank you</strong></p>