RavenclawDev: RavenClawDev: reusing agents in another part of atree
Thomas K Harris
tkharris+ at cs.cmu.edu
Wed Oct 4 11:49:27 EDT 2006
No, it's just the frame that Ravenclaw sends to the backend that has a
galaxy frame embedded as a string. Its output frame contents are accessible
via the normal galaxy frame access calls.
-Thomas
-----Original Message-----
From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu]
Sent: Wednesday, October 04, 2006 11:14 AM
To: Thomas K Harris
Cc: 'Basia Mucha'; 'Dialog Group CMU'
Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of
atree
Thanks Thomas,
in your Jason server you used:
int i =
Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid"));
How did you make that work, did it require some change in RavenClaw?
Svetlana
---------------------------------------------------------
Svetlana Stenchikova, Ph.D. Candidate
Computer Science Department, Stony Brook University
http://cs.sunysb.edu/~sveta
sveta at cs.sunysb.edu
---------------------------------------------------------
On Wed, 4 Oct 2006, Thomas K Harris wrote:
> Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I
wrote
> some fix-up code that converts these frames to real galaxy frames, but the
> code is in c++. The code snippet follows. This is something that probably
> needs to be fixed in Ravenclaw eventually, but there's an installed code
> base that depends on the current format, so it will take some
coordination.
>
>
>
> Gal_PrFrame(f);
>
> char* s_inframe = Gal_StringValue(aStr);
>
> if(s_inframe) {
>
> //frame fixup -> ravenclaw embeds inframe frame
>
> ostringstream fixed;
>
> string notfixed(s_inframe + 1);
>
> istringstream inotfixed(notfixed);
>
> fixed << "{c zap ";
>
> string token;
>
> do {
>
> inotfixed >> token;
>
> if(token == "}") break;
>
> fixed << ':' << token << ' ';
>
> char cpVal[255];
>
> inotfixed.ignore();
>
> inotfixed.getline(cpVal, 254);
>
> fixed << '"' << cpVal << "\" ";
>
> } while(inotfixed);
>
> GalUtil_Error("working with fixed version: %s",
> fixed.str().c_str());
>
> Gal_Frame inframe =
> Gal_ReadFrameFromString(fixed.str().c_str());
>
> }
>
>
>
> -Thomas
>
>
>
> _____
>
> From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu
> [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf
Of
> Basia Mucha
> Sent: Wednesday, October 04, 2006 10:22 AM
> To: Dan Bohus; Dialog Group CMU
> Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of
> atree
>
>
>
> Sorry for the last email, I pressed send by mistake.
>
>
>
> What I wanted to write:
>
>
>
> We have created a CalendarBackened that receive GFrames from the
> DataManagar.
>
> The GFrame looks like this:
>
> Received frame:
> {c java_be.get_events
> :hub_opaque_data {c admin_info
> :reply_requested 1
> :session_id "Default"
> :invoked_stype "java_be"
> :tidx 12
> :provider_id "[8]"
> :timestamp [array: type GAL_FLOAT_64, 1 elements]
> :scriptless 1 }
> :session_id "Default"
> :tidx 12
> :inframe "{
> event_query {
> event_type CLASS
> }
>
> }
> " }
>
> I could easity get the inframe by
>
> String tokens = ((String)f.getProperty(":inframe"));
>
> however is there a way to get the event_type without parsing the string
> meaning something like
>
> String tokesn =
> ((String)f.getPropperty(":inframe.event_query.event_type")????
>
>
>
> Thank You for all your help.
>
>
>
>
>
> On 10/4/06, Basia Mucha <basiamucha at gmail.com > wrote:
>
> Received frame:
> {c java_be.get_events
> :hub_opaque_data {c admin_info
> :reply_requested 1
> :session_id "Default"
> :invoked_stype "java_be"
> :tidx 12
> :provider_id "[8]"
> :timestamp [array: type GAL_FLOAT_64, 1 elements]
> :scriptless 1 }
> :session_id "Default"
> :tidx 12
> :inframe "{
> event_query {
> event_type CLASS
> }
>
> }
> " }
>
>
>
>
> --
> Thanks,
> Basia
>
>
More information about the Ravenclaw-developers
mailing list