6

我正在研究荷兰语语料库,我想知道 NLTK 中是否嵌入了荷兰语语法,以便我可以解析我的句子?一般来说,NLTK 只适用于英语吗?我知道它有 Alpino 荷兰语语料库,但没有迹象表明这些功能(如使用 CFG 解析)也适用于荷兰语。谢谢

4

2 回答 2

2

This is a response to my mail from Steven Bird one of the writers of the NLTK book:

NLTK can work for parsing Dutch if you supply the grammar rules. Please consult the NLTK book for guidance: http://www.nltk.org/book You might be able to use the Alpino corpus in order to develop the grammar (or to train a statistical parser). If your primary interest is obtaining parsed sentences of Dutch, I recommend that you try to find an existing parser rather than developing your own.

In the end I ended up using the Alpino parser which is really strong and written in Prolog, but I managed to port(the binary version) in python.

于 2011-03-07T11:54:56.923 回答
0

我没有一个简单的答案,但是通过结合来自以下两页的信息,您应该能够找到它。 在这里,您可以找到NLTK中高级解析接口的概述。解析器需要一个模型,如果存在,该模型将列在nltk 附带的数据包文档的页面中。

如您所知,Alpino Dutch Treebank 与 NLTK 一起提供,因此在最坏的情况下您应该能够自己学习模型(解析器 api 还提供学习工具)。

希望它以某种方式有所帮助。

于 2011-03-06T09:51:57.050 回答