example.com/path/to/article
000 points · username · 0 hours ago
example.com40 points · 21 comments · 9 years ago · _6cj7
r3bl
_lpa_
ar7hur
1. Get a few thousands book titles that are "long enough" so that the probability they appear in a sentence without meaning the book is low
2. Search these spans in HN comments and use this corpus to train Stanford's CoreNLP NER
3. Run the NER on all comments
4. Check on Openlibrary or another book DB that the extracted spans are real books titles
kuboris
I'm in the process of adding Goodreads and other book websites to get better suggestions.(Using Amazon API is limiting on scale)
As for your question: I've been researching python natural language processing to get probable named entities and check them against Amazon API. I suggest https://spacy.io that has reasonable named entities extraction. However doing it at a scale might produce lot of books that are named as a common phrases.
garysieling
I would look at the OpenLibrary dataset - you might be able to match titles in there to comments, or use it to validate the NER output, if you don't want to go the Amazon link regex route.
The entire dataset is available for download, or you can build a prototype with their API - I did this to map speakers to books with https://www.findlectures.com (you can see it if you hover over a name - e.g. https://www.findlectures.com/?p=1&speaker=-Barack%20Obama).
shanecleveland
"name of book" by "author_first_name author_last_name"
If you could determine the most common words written before the title begins (read, liked, loved, recommend, etc.) you could probably parse out a lot of titles plus their authors.
Eridrus
NER will give you a lot of entities that you need to resolve against something to check if they're actually books anyway, depending on volume you may not find a free API tier.
demonshalo
Ex. If I write a comment saying "The number of our clients went from zero to one instantly", in this sentence, "Zero to One" will match Peter Theil's book.
If you are willing to put up with such "noise" in the output, then you don't need to train a thing or even use ML. Just chunk the given piece of text and look up all the tokens permutations of given length (from 1 up to N) in your SQL Entities Database.
You can generally find this kind of Entities Databases by aggregating a lot of datasets from all over the web or even use something like google books datasets: https://books.google.co.uk/
https://storage.googleapis.com/books/ngrams/books/datasetsv2... - This is an ngram set but there should be one with only book titles somewhere. Can't find it atm but you can search for it yourself!
You could even (if you are brave enough) try to use wikipedia's dumps to mine book titles from articles
[0] http://hackernewsbooks.com/