convertdb.rb
Path: convertdb.rb
Modified: Wed Sep 03 05:32:08 GMT 2003

Conversion script for Ruby-WordNet

Synopsis

  ./convertdb.rb [DATADIR]

Authors

This is a port of Dan Brian’s convertdb.pl in the Lingua::Wordnet distribution. It requires the ‘strscan’ library, which is in the standard library of Ruby 1.8.

Copyright

Copyright © 2003 The FaerieMUD Consortium. All rights reserved.

This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)

Version

 $Id: convertdb.rb,v 1.5 2003/09/03 05:32:08 deveiant Exp $
Required files
strscan    utils    wordnet    optparse    fileutils   
Methods
main    parseIndexLine    parseMorphLine    parseSynsetLine   
Included modules
UtilityFunctions
Public Instance methods
main()

M A I N P R O G R A M

parseIndexLine( string, lineNumber, pos=nil )

Parse an entry from one of the index files and return the key and data. Returns nil if any part of the netry isn’t able to be parsed. The pos argument is not used — it’s just to make the interface between all three processor methods the same.

parseMorphLine( string, lineNumber, pos )

"Parse" a morph line and return it as a key and value.

parseSynsetLine( string, lineNumber, pos )

Parse an entry from a data file and return the key and data. Returns nil if any part of the entry isn’t able to be parsed.