On Tue, 5 Jun 2007, Sebastian Hagen wrote:

Since wordnet is (even in its outdated version) one of the most useful general-purpose dictionaries for dictd, this is highly unfortunate.

Definitely.

Digging through the hundreds of lines of string-processing C code of wnfilter to find out what exactly it is doing wrong with files in the new wordnet format, seemed like more pain than it would be worth to me;
I instead wrote a replacement of wnfilter in Python.

Great idea.

The format parser and writer are mostly based on the descriptions of the wordnet format in wndb(7) and the descriptions of the dictd file-format in dictd(8), coupled with a few experiments to figure out some of the details of the dicdt format dictd(8) doesn't mention.

wordnet_structures.py self-documents if called with --help, but here's a typical usage example:

Unfortunately there is a problem:

...
mkdir -p data
for file in ../../dict/dbfiles/data.* ../../dict/dbfiles/index.[anv]* ; do ln -s ../$file data ; done
LC_ALL=C python wordnet_structures.py `ls data/index.[anv]* | sort`
Opening index file 'data/index.adj'...
Opening data file 'data/index.adv'...
Parsing index file and data file...
Traceback (most recent call last):
  File "wordnet_structures.py", line 314, in ?
    wnd.wn_dict_add(file_index, file_data)
  File "wordnet_structures.py", line 211, in wn_dict_add
    (synsets, license_lines) = Synset.build_from_file(file_data)
  File "wordnet_structures.py", line 170, in build_from_file
    synset = cls.build_from_line(line.rstrip())
  File "wordnet_structures.py", line 129, in build_from_line
    synset_offset = int(line_split[0],10)
ValueError: invalid literal for int(): 'tween

wordnet_structures.py itself is Free Software, of course; specifically, it's GPLed. Is this sufficient for you to bring back dict-wn for the newer versions of wordnet?

In principle yes.  My first attempt to include it into packaging can be
found at

   http://people.debian.org/~tille/packages/wordnet/

so you will perhaps be able to reproduce the problem and might be
fix the issue.

I'm REALLY interested in bringing back the dict-wn package and thus
I would like to support your work by a timely upload.

Kind regards and thanks for your work

          Andreas.

PS: Note that the clean target in debian/rules is not ready currently
    and thus dh_clean fails.  I'm working on this but thought you would
    be interested in a quick response.


--
http://fam-tille.de


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to