Basically, you're trying to quick-parse sentences. My cousin did her master's thesis on comparing two algorithms for natural language parsing. Just two, and she got a Masters.

The problem is that the rules for parsing a natural language are context-driven. In your example, "my dog" is the subject because it precedes "is", not because it's a noun. (And, just to make things more complicated, "dog" is considered a noun solely due to placement. There is a verb "dog", too.)

I'll give you another example. "Pole, you Pole!" That is a perfectly good imperative sentence in english. It breaks down as "Verb (command), Object". However, if I change it to "Pole, you pole!" ... That breaks down to "Object, Verb (command)". The only difference was capitalization. But, I suspect all the english-speakers could understand what I was saying. How would you encapsulate those rules?

I'm not trying to say it can't be done. In fact, I'm working on an algorithm myself, in my spare time. However, I certainly do not think that Perl is the place to do it. The data structures are too large and the algorithms too computationally-intensive for Perl to be a good language.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.


In reply to Re: Casual Communication, AI, and Text Processing by dragonchild
in thread Casual Communication, AI, and Text Processing by one4k4

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.