View Single Post
Old 11-29-2012, 02:08 PM   #118
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by gouni View Post
Hello

file : index

marisa-build -owords index.txt

give : words

I want to do the reverse-path

I have a word file, I want to find index file

It is possible the words file by marisa having the index?
Unfortunately the marisa tools do not offer a possibility to dump the marisa-file as a whole. With marisa-reverse-lookup you can retrieve the content line by line by typing the line number at the marisa prompt. This, of course, is time consuming in case of large files.
One thing you can do is the following. Type
Code:
marisa-predictive-search -n0 words > index.txt
Then type at the marisa prompt:
Code:
a ENTER
b ENTER
c ENTER
and so on.
This will output all entries starting with a,b,c and so on with additional information to index.txt. You can easily edit the file and remove the additional information. Be aware that marisa is case sensitive.
tshering is offline   Reply With Quote