With some embeddings of constituents:
{With a population {of more than 10.2 million}pp}pp
{the capital {of South Korea}pp}np
It gets worse. It has to understand modifiers -- and
know which modifiers are modifying what. For example,
the prep. phrase starting with "with a pop..." in
the example sentence modifies Seoul, but does "in
terms of population" modify "is" adverbially, or
does it modify "city" adjectivally? A human can
analyze what the sentence would mean each way and
conclude that it doesn't matter -- the meaning is
the same. You're going to ask AI to figure that out?
Let me lay it on the line: it is *possible* to achieve
*sporadic* and *partial* results using an assortment
of tricks, but a human is still going to have to go
over the results. It would be interesting academic
research, but it is currently not of any practical
value, because the programming is going to cost more
money than the program's going to save you over the
obvious solution of hiring a minimum-wage peon to
do it instead of writing the program. Yep, that's
right: my recommendation to the OP is, hire a
work-study
student (who is not majoring in your subject area,
preferably) to write your questions or whatever,
and just forget about programming it -- unless
AI research is interesting to you for its own sake.
;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print