Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Interesting but highly sophisticated. Most probably you would need not just a syntactic analysis (how the words are strung together) of the input sentence(s) but a semantic one (the meanings of the words) as well.
The parser has to "understand" the following partial realisations of the original first sentence:
With a population of more than 10.2 million, Seoul, the capital of South Korea, is the world’s largest city in terms of population.1) Seoul, the capital of South Korea, is the world’s largest city in terms of population with a population of more than 10.2 million. 2) The capital of South Korea, Seoul, is the world’s largest city in terms of population with a population of more than 10.2 million. 3) With a population of more than 10.2 million, the capital of South Korea, Seoul, is the world’s largest city in terms of population. 4) In terms of population, Seoul, the capital of South Korea, is the world’s largest city with a population of more than 10.2 million. Update I think the first task of any parser is to recognise that the original first sentence (or its transformed counterparts) has the following constituents: {With a population of more than 10.2 million}pp, {Seoul}np, {the capital of South Korea}np, {is the world’s largest city}vp {in terms of population}pp. where pp->prepositional phrase np->noun phrase vp->verb phrase With some embeddings of constituents: {With a population {of more than 10.2 million}pp}pp {the capital {of South Korea}pp}np In reply to Re: The (futile?) quest for an automatic paraphrase engine
by kiat
|
|