Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Casual Communication, AI, and Text Processingby dragonchild (Archbishop) |
on Mar 28, 2002 at 16:48 UTC ( [id://155037]=note: print w/replies, xml ) | Need Help?? |
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. ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
In Section
Seekers of Perl Wisdom
|
|