eleybourn / Book-Catalogue

A book cataloging tool for Android phones.
https://github.com/eleybourn/Book-Catalogue/wiki
GNU General Public License v3.0
382 stars 186 forks source link

Search using barcode scanner to acquire EAN/ISBN, "fuzzy" matching of returned book #343

Open simonpickering opened 12 years ago

simonpickering commented 12 years ago

When I'm standing in a bookshop, it would be great to be able to scan a book barcode and be able to search the database for it using the decoded EAN/ISBN. If the book is present it could be displayed as per the manual input search, and if not perhaps the user could be given the option to add it to a bookshelf (e.g. I could then add it to a Wishlist bookshelf).

If this were implemented, it would also be useful to perform "fuzzy" matching of the book which matches the ISBN - by this I mean that I don't (necessarily) want to buy another copy of a book just because it has a different ISBN (e.g. hardback vs softback, different editions, US vs UK edition, etc.)

I suppose I could overcome this latter issue by just typing in the book title, but barcode scanning is easier ;)

Grunthos commented 12 years ago

Currently, if you walk into a bookshop and click 'Add Book', you can scan a barcode. If you already have the book it will warn you. It will also allow you to add it again, if you really want to. Is this part of what you wanted?

The second part is less clear to me: do you want to:

simonpickering commented 12 years ago

I could click "Add Book" as you say, it just seemed to me that if I'm actually wanting to search, it would make sense to be able to search using the barcode scanner. Not a functionality problem but more one of expectations on the search function.

The second part (apologies for combining them) is as you say to search/scan an ISBN and then determine whether there are other books already in the database with the same, or a similar title (see e.g. "Hitchhiker's Guide to the Galaxy" on Amazon - there are lots of books which may or may not overlap in their content and have slightly different titles; alternatively "Robinson Crusoe" has lots of different editions with different ISBNs).

The former would require a "fuzzy search" in order to pick out similar titles, while the latter would only require an ISBN->title lookup and a search of the database for that title. Perhaps the easiest way would be to lookup the title & author from the scanned ISBN, then perform searches for both the title and the author and present them to the user to manually inspect.

A fuzzy search option still be nice though to see what other related books you already have (e.g. scan a book titled e.g. "British Castles" and see what similar "Castle" books you already own, which might mean you don't need this one too! ;).

Grunthos commented 11 years ago

Thinking a bit more about this, adding something look 'Search Collection', then perhaps something like:

if by text, it just does the usual search

if by barcode, it display any exact matches...but if none, then it combines the author and title from online and does a search by text.

simonpickering commented 11 years ago

Sounds good.

It would still be nice to return exact matches (if any), a list of author matching books, and a list of related books (by analysing title keywords).

Even the author field can be arranged differently (first last; last, first; initial last; etc.) so matching this from the online data will need some moderate intelligence. Matching of keywords in the title would need more intelligence (but would be an interesting challenge :))

Grunthos commented 11 years ago

Trying to do the fuzzy search is probably beyond the scope of a handheld app; that said, I do see a great deal of value in checking 'do I own a different edition of this book'. The latter does not require fuzzy search, it just requires searching by author/title when no ISBN match is found.

Grunthos commented 11 years ago

Whatever code is added here should also be considered for use when adding a 'new' book via barcode scanning; eg.