本文介绍了WPF的IronPython中的NLTK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用IronPython在Python中使用NLTK(自然语言工具包),并从现有的WPF/c#项目中调用.

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

是否可以通过这种方式从WPF中引用NLTK.例如要使用来自NTLK的命名实体识别?

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.

推荐答案

只要NLTK不使用任何C扩展名,肯定可以.但是,由于使用了dynamic关键字,如果您使用VS2010,它将更加容易.查看IronPython的Microsoft.Scripting.Hosting库,它将使您开始加载NLTK代码并在其上执行方法.

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.

这篇关于WPF的IronPython中的NLTK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 08:04