nltk/nltk — Issue #42: sem.relextract demo
Author: alexrudnick
Created: 2012-01-17 06:14:10+00:00
State: open

What steps will reproduce the problem?
1. sem.relextract.demo()

What is the expected output? What do you see instead?

Dutch CoNLL2002: van(PER, ORG) -- raw rtuples with context:
=============================================
...'')[PER: "Cornet/V d'Elzius/N"] 'is/V op/Prep dit/Pron ogenblik/N kabinetsadviseur/N van/Prep
staatssecretaris/N voor/Prep' [ORG: 'Buitenlandse/N Handel/N'](''...
Traceback (most recent call last):
File "nltk/sem/relextract.py", line 437, in <module>
conllned()
File "nltk/sem/relextract.py", line 401, in conllned
for doc in conll2002.chunked_sents('ned.train'):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/nltk/util.py", line 869, in iterate_from
for value in self._lists[0].iterate_from(index):
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/nltk/corpus/reader/util.py", line 275, in iterate_from
tokens = self.read_block(self._stream)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/nltk/corpus/reader/conll.py", line 189, in _read_grid_block
% block)
ValueError: Inconsistent number of columns:
U Pron O
mag V O
één V O
keer N O
raden V O

Please use labels and text to provide additional information.

Migrated from http://code.google.com/p/nltk/issues/detail?id=158

earlier comments

StevenBird1 said, at 2009-09-19T05:25:51.000Z:

The same problem shows up in relextract.doctest