Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Being Forced to Fork with Nested Regular Expressions

by Ovid (Cardinal)
on Jan 02, 2004 at 21:41 UTC ( [id://318421]=note: print w/replies, xml ) Need Help??


in reply to Re: Being Forced to Fork with Nested Regular Expressions
in thread Being Forced to Fork with Nested Regular Expressions

A bit of thought tells me that there are some problems with this approach. Basically, you have a main table as follows:

+----------+
| Facts    |
+----------+
| verb     |
| subject  |
| object   |
+----------+

That limits me to simple things such as "owns Ovid gold". However, what if I want to express "gives Ovid books kudra"? In this case, there's an implied prepositional phrase "to kudra" that doesn't fit and this tremendously limits the utility of this approach.

My other option would be to create a recursive tree structure with arbitrary depth. I've done that before and it's not fun, but I can see no other way to approach this.

Cheers,
Ovid

New address of my CGI Course.

  • Comment on Re: Re: Being Forced to Fork with Nested Regular Expressions

Replies are listed 'Best First'.
Re: Re: Re: Being Forced to Fork with Nested Regular Expressions
by paulbort (Hermit) on Jan 05, 2004 at 17:46 UTC
    Your OP didn't mention prepositions, so I didn't even think about them. At that point you're really looking for something more like a natural language parser. A quick wander through CPAN finds Lingua::EN::Tagger which might help.

    The post giving an example of a Prolog interface from Perl is also worth looking at, as all the heavy lifting has already been done in Prolog.

    Something else that might help would be to look at the MUSH code, which had a rich object-oriented environment, and could at least store the kind of state information you're describing, and much more. The queries would be interesting. PennMUSH seems to be the current MUSH implementation of choice.

    --
    Spring: Forces, Coiled Again!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://318421]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found