<p>Had a brief discussion with the author of the book: "Python Text Processing with NLTK 2.0 Cookbook", Mr.Jacob Perkins. He said, "a generalized grammar for sentences is pretty hard. I would instead see if you can find common tag patterns, and use those. But then you're essentially do classification by regexp matching. Parsing is usually used to extract phrases within a sentence, or to produce deep parse trees of a sentence, but you're just trying to identify/extract sentences, which is why I think classification is a much better approach. Consider including tagged words as features when you try this, since the grammar could be significant." taking his suggestions I looked at the causal sentences I had and I found out that these sentences have words like</p>

<pre><code>consequently
as a result
Therefore
as a consequence
For this reason
For all these reasons
Thus
because
since
because of
on account of
due to
for the reason
so, that
</code></pre>

<p>These words are indeed connecting cause and effect in a sentence. Using these connectors it is now easy to extract causal sentences. A detailed report can be found on arxiv: <a href="https://arxiv.org/pdf/1507.02447.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1507.02447.pdf</a> </p>
Causal Sentences Extraction Using NLTK python
<p>I am extracting causal sentences from the accident reports on water. I am using NLTK as a tool here. I manually created my regExp grammar by taking 20 causal sentence structures [see examples below]. The constructed grammar is of the type </p>

<pre><code>grammar = r'''Cause: {&lt;DT|IN|JJ&gt;?&lt;NN.*|PRP|EX&gt;&lt;VBD&gt;&lt;NN.*|PRP|VBD&gt;?&lt;.*&gt;+&lt;VBD|VBN&gt;?&lt;.*&gt;+}'''
</code></pre>

<p>Now the grammar has 100% recall on the test set ( I built my own toy dataset with 50 causal and 50 non causal sentences) but a low precision. I would like to ask about: </p>

<ol>
<li>How to train NLTK to build the regexp grammar automatically for
extracting particular type of sentences.</li>
<li><p>Has any one ever tried to extract causal sentences. Example
causal sentences are:  </p>

<ul>
<li><p>There was poor sanitation in the village, as a consequence, she had
health problems.</p></li>
<li><p>The water was impure in her village, For this reason, she suffered
from parasites.</p></li>
<li><p>She had health problems because of poor sanitation in the village.
I would want to extract only the above  type of sentences from a
large text.</p></li>
</ul></li>
</ol>