Hello,
I am writing a Natural Language Parser and one of the tools I need is to separate prepositional phrase markers which begin with a Preposition. I have a long list of such markers (sample given below)and am looking for a script in awk or perl which will allow me to access a look-up file containing these prepositions and split them.
A sample is given below:
The text below is a tagged text using a Language parser
The expected output would be
The prepositions would necessarily be preceded by
as in the example above.
A sample list of the preposition markers is given below:
Many thanks in advance for help. A commented code would help even more to enable me to read from a list and insert a new line when the condition is met.
I am writing a Natural Language Parser and one of the tools I need is to separate prepositional phrase markers which begin with a Preposition. I have a long list of such markers (sample given below)and am looking for a script in awk or perl which will allow me to access a look-up file containing these prepositions and split them.
A sample is given below:
The text below is a tagged text using a Language parser
Code:
[ There_EX could_MD be_VB more_RBR casualties_NNS in_IN the_DT mishap_NN ,_, ''_null]
Code:
[ There_EX could_MD be_VB more_RBR casualties_NNS]
[ in_IN the_DT mishap_NN ,_, ''_null]
Code:
NN
NNS
NNP
followed by space
A sample list of the preposition markers is given below:
Code:
to_IN
in_IN
towards_IN
across_IN
for_IN
into_IN
up to _IN