I have this pattern to get cause-effect relationship between noun phrases in a sentence:
<NP I> * have * effect/impact on/in <NP II>
NP is Noun Phrase.
If I have a sentence:
Technology can have negative impact on social interactions
then based on above pattern, NP I match with Technology and NP II match with social interactions
The question: what is appropriate algorithm to get NP I and NP II?
Thanks
Regular expression (RegEx) is extremely useful in cases like this. The following regex matches your string format and allows for you to analyze the differing variables of the input.
By running the following program, you can see how regex matcher groups work, and that group 1 is NP 1, and group 6 is NP 2.
In the above example, the string
"Greenhouse gases can have negative impact on global warming."is analyzed. The following is the output of the program.