Convert a file from python

You have problems, and we're glad to hear them. Explain the problem, what you have tried, and where you got stuck.
Feel free to share a little info on yourself and the course.
Forum rules
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.

Convert a file from python

Postby rkappler » Tue Jul 24, 2012 6:09 pm

This is not really homework, I'm a public high school teacher and need help with an idea I have to help my "revisited' students learn logic and mathematical thinking. I am learning Lisp for the sheer joy of it and as I think it will fit into my classroom ideas quite handily (I'd be happy to discuss these off line or in a different post if desired), but I'm only a few weeks into it and this task is, (I think, at this point) beyond my skill level. I have the files I need to do what I want to do, but they're in python, and I really want to stick with Lisp. Can anyone either

a) convert a few python files to Lisp (they aren't terribly long)
b) guide me through converting them
c) look at the python files and give me an idea what exactly they do and how they do it so I can make their conversion part of my learning curve?

I'd really appreciate the help, though I realize it's a rather odd request, and please do accept my apology if this request is inappropriate.

The files are open source so I'm not trying to pull off anything nefarious, they are chatbot files, in particular a parser for AIML.

regards, Richard
rkappler
 
Posts: 2
Joined: Wed Jun 27, 2012 6:49 am

Re: Convert a file from python

Postby nuntius » Tue Jul 24, 2012 9:29 pm

I can't guarantee any time to look at this, but could you post a link to the files?

Also, if you haven't seen it, you really should look at HtDP and Bootstrap.
User avatar
nuntius
 
Posts: 498
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA

Re: Convert a file from python

Postby rkappler » Tue Jul 24, 2012 9:39 pm

Sure, and thanks for the reply. It's pyaiml http://pyaiml.sourceforge.net
I understand the aiml files themselves, its just the parser I'm pretty clueless about. Not sure if I should just leave it as a python program and call it from within lisp or write it from scratch in lisp or maybe just use an XML parser?

Regards, Richard
rkappler
 
Posts: 2
Joined: Wed Jun 27, 2012 6:49 am

Re: Convert a file from python

Postby nuntius » Wed Jul 25, 2012 8:21 pm

Yeah, you're probably best off using a general-purpose XML framework. I can't find any open code for AIML (only the closed Pandorabots).

Here's a list of the latest tags.

Using an XML library, you should be able to quickly get an AIML parser/generator framework put together.
It sounds like you already have a plan for the interpreter.
User avatar
nuntius
 
Posts: 498
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA


Return to Homework

Who is online

Users browsing this forum: No registered users and 0 guests

cron