Commit graph

62 commits

Author SHA1 Message Date
Eevee
2bc41e2c62 Added support for lookup by other language name. #15
English fuzzy matches are preferred, followed by Roomaji and then
everything else.

The return tuple from lookup() now has a `name` parameter for the actual
name that was matched.
2009-08-22 01:13:34 -07:00
Eevee
4e51867e95 Added lookup support for foreign language names. #15
Changed lookup()'s return value to be a list of named tuples so the
caller can know which language each result is in.
2009-08-21 00:30:01 -07:00
Eevee
0b5eba6620 open_index was returning an index instead of a SpellChecker. #15 2009-08-20 21:07:06 -07:00
Eevee
0a893be01d Allow lookup() callers to pass in their own whoosh indices. 2009-08-20 17:36:31 -07:00
Eevee
0300e01cff Removed whoosh hacks; 0.3 obviates them. #15 2009-08-18 23:50:35 -07:00
Eevee
16072ceb44 Added setup command and made lookup work sanely. #15
The setup command loads the default data into a default location, then
creates a whoosh index in a default location.

get_index is now open_index and can be made to explicitly recreate the
index.  It also actually opens the index if it already existed, even
across processes, now that FileStorage is working.

The lookup command takes no switches for aiming at a different database;
it only uses the default data stores.
2009-08-18 23:50:13 -07:00
Eevee
238487c908 Fixed whoosh index creation to work with 0.2.x. #15 2009-08-16 21:03:49 -07:00
Eevee
20d40364b1 Lookup search lowercases the term again; whoops. #15 2009-07-27 18:45:43 -07:00
Eevee
76d7bbe0e7 Added moves, types, items, and abilities to lookup index. #15 2009-07-26 23:18:11 -07:00
Eevee
cce9c26125 Removed the need for a spelling column in the lookup index. #15
Whoosh's spelling module unfortunately ignores any "words" that don't
look like words, even though the algorithm words fine with arbitrary
input.

I had to clone some code from whoosh.spelling, but avoiding the
isalpha() check solved a bunch of problems.  Now the index happily
compares against anything I feed into it.
2009-07-26 00:37:37 -07:00
Eevee
b13ffac247 Pokédex lookup now uses a whoosh index and spell-checker. #15 2009-07-25 01:28:33 -07:00
Eevee
f23a3401f2 Stubbing out a lookup function. #15 2009-07-21 00:12:25 -07:00