.dz is just .bz file. It is Stardict dictionary data file. And inside it is XML file (looks like).
To unpack run:
gunzip filename.dict.dz -S .dzFor ruby You could read it using GZip reader and process as xml using nokogiri.
require 'nokogiri' require 'zlib' include Zlib data = GzipReader.open("dict.dict.dz"){|f|f.read} doc = Nokogiri::XML(data) p doc.xpath("k")[0].content
No comments:
Post a Comment