9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] mkindex of dict(7)
@ 2009-01-05  6:08 Akshat Kumar
  2009-01-05  7:15 ` Akshat Kumar
  0 siblings, 1 reply; 8+ messages in thread
From: Akshat Kumar @ 2009-01-05  6:08 UTC (permalink / raw)
  To: 9fans

In its current state, /sys/src/cmd/dict/mkindex suicides if
/lib/dict/oed2 is not present and '-d' option is not specified (along
with the dict name) -- fix:
	move /sys/src/cmd/dict/mkindex:57 to
	after /sys/src/cmd/dict/mkindex:62
(that is, place the Bseek after the conditional on Bopen/bdict)

Is no one is using it these days?
ak





^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [9fans] mkindex of dict(7)
@ 2009-01-05  7:27 Akshat Kumar
  0 siblings, 0 replies; 8+ messages in thread
From: Akshat Kumar @ 2009-01-05  7:27 UTC (permalink / raw)
  To: 9fans

/sys/src/cmd/dict/dict.c states:
/*
 * Assumed index file structure: lines of form
 * 	[^\t]+\t[0-9]+
 * First field is key, second is byte offset into dictionary.
 * Should be sorted with args -u -t'	' +0f -1 +0 -1 +1n -2
 */

whereas, /sys/src/cmd/dict/mkindex outputs:
<byte offset>	<key>
i.e.,
0	ヽ [くりかえし]
(custom dictionary  from EDICT)
or
158928	Ab*sorb`a*bil"i*ty
(pgw)

thus, the resulting index from mkindex seems to not be usable with
dict(7)


Perhaps, before I dive into thinking I'm fixing things,
someone would be kind enough to look into the above?
ak




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-06 12:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05  6:08 [9fans] mkindex of dict(7) Akshat Kumar
2009-01-05  7:15 ` Akshat Kumar
2009-01-05 14:13   ` erik quanstrom
2009-01-05 14:41     ` erik quanstrom
2009-01-06  5:34       ` Akshat Kumar
2009-01-06 12:41         ` Fazlul Shahriar
2009-01-06 12:50           ` Akshat Kumar
2009-01-05  7:27 Akshat Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).