tags:

views:

149

answers:

1

Hi,

I need some guidance on where to start on this issue, or to know if it is possible.

I would like to use NLTK (Natural Language Toolkit) for Python using IronPython and call from an exisiting WPF/c# project.

Is it possible to reference NLTK from within WPF in this way. For example to use Named Entity Recognition from NTLK?

Any advice or guidance appreciated.

A: 

It definitely is possible, as long as NLTK doesn't use any C extensions. It will be much easier if you use VS2010 though, because of the dynamic keyword. Look at the Microsoft.Scripting.Hosting library from IronPython, it will get you started towards loading the NLTK code and executing methods on it.

Paul Betts
Hi Paul, thanks for the guidance. I managed to get NLTK to work inside IronPython console with some help from http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=24357I now just need to figure out how to call NLTK from c#. I am using .NET 4 Beta 2 right now. I will look into Microsoft.Scripting.Hosting but if anyone has further guidance, then please let me know.
Sam Tr
Dig through ScriptScope to find the class you want, then you can use dynamic keyword to call methods on it
Paul Betts