I built this small app in my spare time to aggregate books recommended on Hacker News. I personally find books recommended on HN to be super helpful, so I think this is the way that I can contribute back. This book aggregation idea is not new. A bunch of sites have done similar things [1, 2, 3]. Yet one common limitation of those sites is that they have limited recall (i.e. not able to get a comprehensive set of book mentions), and thus don't paint an accurate picture of what the top books are. They're all based on insufficient rules, e.g., looking for Amazon Links. As you can see from my app, people often do not include Amazon links when recommending a book. I wondered, why can't we just match book names? Well, not so easy. Some books have pretty short names, e.g. Meditations [4], or Steve Jobs [5]. Some book name might as well be the name of a movie, e.g. Ready Player One [6]. Simply matching the names of the books would produce a whole lot of irrelevant results. This is where Deep Learning comes into play. Recent advances in large NLP models (transformers and BERT in particular) have made machine language understanding unprecedentedly accurate. It enables me to fine-tune a BERT model on a couple thousand labeled HN comments and predict accurately whether each word in a comment is part of a book or not - a task commonly termed as Named Entity Recognition (NER). As a result, my app is able to present a whole lot more results while maintaining desirable accuracy. For example, NER works pretty well on the tough examples I mentioned ([4, 5, 6]). Compared to prior sites, my app captures 9-50X more mentions and thus presents a much more complete picture of what books are recommended on HN. Furthermore, I've made sure that the comments are presented well in the UI because the recommendations are just as useful as the books. I highlighted the mentioned book name, and used a custom NLP-based ranking function to sort the comments. These are non-trivial improvements over prior sites, which I hope you can find useful. Nevertheless, this app is not without limitations: 1) matching book names would fail when two books have the same or similar names; 2) although not often, this approach would wrongly classify some short stop-word names [7] and 3) sometimes NER fails to see that the commenter actually hates the book. These problems can be alleviated with more Deep Learning. For 1), one can use BERT to learn the authors mentioned which can be used as a filtering criteria. 2) and 3) should be fixable with more training data (currently there are only ~4,000 hand-labeled HN comments). Lastly, I'd like to especially thank my gf who helped me label ~1,000 comments, which boosted the model accuracy by 5 percent! I also want to thank the people who create and maintain the HackerNews big query dataset [8]. And of course, thank everyone on HN who recommends books to others. Hope you enjoy this app! Feedback and suggestions are welcome :) [1] https://news.ycombinator.com/item?id=15169611 [2] https://news.ycombinator.com/item?id=10924741 [3] https://news.ycombinator.com/item?id=12365693 [4] https://hacker-recommended-books.vercel.app/category/0/all-t... [5] https://hacker-recommended-books.vercel.app/category/1/all-t... [6] https://hacker-recommended-books.vercel.app/category/0/all-t... [7] https://hacker-recommended-books.vercel.app/category/12/past... [8] https://news.ycombinator.com/item?id=19304326 P.s. The amazon links are NOT sponsored. This app is free of monetization.
Nice. The Hacker News archive contains a wealth of great information. I've previously performed similar extractions like OP but with grep and SQL. I've also looked for people who have accurately predicted the stock market (I did identify one pro investor. He's now into NFTs). I've found so much cool stuff, spending whole nights looking for interesting users and reading their entire post histories and being blown away by many insightful posts. I've been considering making a blog consisting entirely of insightful HN posts that I come across.
i think someone should start a fund that exclusively invests in startups that get torn to shreds on HN, “Why would anyone use this, I could build it in a weekend!”.. often means the startup goes on to reach a billion dollar valuation.
here's my idea: understand the sentiment of HN comments using BOW models on successful startups already lunched, invest in the next ones.
Sounds like an IFF fallacy— sure, HN hates some thing that turn out to be successful, but lots of things HN hates really are terrible (or turn out to be successful for unrelated reasons, like the team was great and they managed to pivot away from the terrible idea).
Anyone technically minded used FTP back in the days. So why is there a need for Dropbox (at that time). That is what makes it hard to invest if you think too much or "know" too much. You get blinkers that prevent you seeing what become obvious successes because of UX improvements for the non-technical crowd.
You mention the Amazon links are not affiliate links. As a default, that's a nice move, but I believe you are within your rights to add a toggle to enable affiliate links. The money probably isn't the point but it's nice to make enough to buy even a single beer or coffee from a side project, and honestly I believe just about everyone would toggle the option if they found the tool useful.
I would go further and suggest just having a link to wikipedia or goodreads or some other non-money-generating site and one (always with affiliate tags) to amazon.
IMO it's not a "bad surprise" to a user that an amazon link is an affiliate one, it's just annoying when the only way you can get information on a book is through affiliate links.
> As a default, that's a nice move, but I believe you are within your rights to add a toggle to enable affiliate links.
I'd go even further. It's a loud minority that even cares at all about this and they make it feel like everybody agrees with them, but most people don't care and you're totally within your rights to do it. You should go for it!
The downside of affiliate links that I'm aware of is that Amazon makes available the entirety of any orders credited to an affiliate, so if multiple items are ordered the affiliate is able to see the entire order.
Clicking through an affiliate link associates future orders for 24 hours, and once an order is placed no further orders are associated. (If an item is added to the cart while associated with an affiliate link it stays associated for 90 days, but it's not clear to me what information is provided to the associate regarding other items in the order if that item is eventually purchased.) https://affiliate-program.amazon.com/help/node/topic/GPTZ495...
You mentioned transformers and BERT for large NLP models. I've been playing around with this too and it's a really powerful approach. Have you used spacy-transformers? [0] The approach is pretty cool and can be used with BERT, GPT-2/Hugging Face etc. I'm just starting to experiment with GPT-J and thinking of trying this approach also [1]. Anyway, totally awesome project and the results are really good. This stuff really is almost unreasonably effective! [0] https://explosion.ai/blog/spacy-transformers [1] https://6b.eleuther.ai/
This is a really good application of it. Getting NER right for something like book titles with so much name collision with other domains and entity types is really hard, and this works great on something that most people would never realize would be so hard!
This is really impressive! Can you please elaborate more on the way you labeled the data? I think usually there is a lot to learn from labeling methods.
I generated training comments by matching book names. Roughly, there are one in five of those comments that actually have a book mention. Then I use the Doccano labeling tool to label the tokens in the comments.
Thanks for building this, it's useful and well presented!
Replies to your pinned top comment seems disabled, so allow me to ask here (sorry for the hijack): > used a custom NLP-based ranking function to sort the comments Can you expand on this function? (I'm familiar with NLP and most SOTA models)
Ah right now ranking is really rudimentary: I just use TextBlob's SA library to get a sentiment score for the comment, and combine it with the comment length. In theory we can also use BERT to get a sentiment score, which should be more accurate I guess? Love to hear your thoughts.
Comments (273) 114 threads
I built this small app in my spare time to aggregate books recommended on Hacker News. I personally find books recommended on HN to be super helpful, so I think this is the way that I can contribute back.
This book aggregation idea is not new. A bunch of sites have done similar things [1, 2, 3].
Yet one common limitation of those sites is that they have limited recall (i.e. not able to get a comprehensive set of book mentions), and thus don't paint an accurate picture of what the top books are. They're all based on insufficient rules, e.g., looking for Amazon Links. As you can see from my app, people often do not include Amazon links when recommending a book.
I wondered, why can't we just match book names? Well, not so easy. Some books have pretty short names, e.g. Meditations [4], or Steve Jobs [5]. Some book name might as well be the name of a movie, e.g. Ready Player One [6]. Simply matching the names of the books would produce a whole lot of irrelevant results.
This is where Deep Learning comes into play. Recent advances in large NLP models (transformers and BERT in particular) have made machine language understanding unprecedentedly accurate. It enables me to fine-tune a BERT model on a couple thousand labeled HN comments and predict accurately whether each word in a comment is part of a book or not - a task commonly termed as Named Entity Recognition (NER).
As a result, my app is able to present a whole lot more results while maintaining desirable accuracy. For example, NER works pretty well on the tough examples I mentioned ([4, 5, 6]). Compared to prior sites, my app captures 9-50X more mentions and thus presents a much more complete picture of what books are recommended on HN.
Furthermore, I've made sure that the comments are presented well in the UI because the recommendations are just as useful as the books. I highlighted the mentioned book name, and used a custom NLP-based ranking function to sort the comments. These are non-trivial improvements over prior sites, which I hope you can find useful.
Nevertheless, this app is not without limitations: 1) matching book names would fail when two books have the same or similar names; 2) although not often, this approach would wrongly classify some short stop-word names [7] and 3) sometimes NER fails to see that the commenter actually hates the book. These problems can be alleviated with more Deep Learning. For 1), one can use BERT to learn the authors mentioned which can be used as a filtering criteria. 2) and 3) should be fixable with more training data (currently there are only ~4,000 hand-labeled HN comments).
Lastly, I'd like to especially thank my gf who helped me label ~1,000 comments, which boosted the model accuracy by 5 percent! I also want to thank the people who create and maintain the HackerNews big query dataset [8]. And of course, thank everyone on HN who recommends books to others.
Hope you enjoy this app! Feedback and suggestions are welcome :)
[1] https://news.ycombinator.com/item?id=15169611
[2] https://news.ycombinator.com/item?id=10924741
[3] https://news.ycombinator.com/item?id=12365693
[4] https://hacker-recommended-books.vercel.app/category/0/all-t...
[5] https://hacker-recommended-books.vercel.app/category/1/all-t...
[6] https://hacker-recommended-books.vercel.app/category/0/all-t...
[7] https://hacker-recommended-books.vercel.app/category/12/past...
[8] https://news.ycombinator.com/item?id=19304326
P.s. The amazon links are NOT sponsored. This app is free of monetization.
Anyone technically minded used FTP back in the days. So why is there a need for Dropbox (at that time).
That is what makes it hard to invest if you think too much or "know" too much. You get blinkers that prevent you seeing what become obvious successes because of UX improvements for the non-technical crowd.
Continue this thread — 2 replies
I'm going to take extreme issue with your use of the word "often" here.
IMO it's not a "bad surprise" to a user that an amazon link is an affiliate one, it's just annoying when the only way you can get information on a book is through affiliate links.
I'd go even further. It's a loud minority that even cares at all about this and they make it feel like everybody agrees with them, but most people don't care and you're totally within your rights to do it. You should go for it!
Clicking through an affiliate link associates future orders for 24 hours, and once an order is placed no further orders are associated. (If an item is added to the cart while associated with an affiliate link it stays associated for 90 days, but it's not clear to me what information is provided to the associate regarding other items in the order if that item is eventually purchased.)
https://affiliate-program.amazon.com/help/node/topic/GPTZ495...
You mentioned transformers and BERT for large NLP models. I've been playing around with this too and it's a really powerful approach. Have you used spacy-transformers? [0]
The approach is pretty cool and can be used with BERT, GPT-2/Hugging Face etc.
I'm just starting to experiment with GPT-J and thinking of trying this approach also [1].
Anyway, totally awesome project and the results are really good. This stuff really is almost unreasonably effective!
[0] https://explosion.ai/blog/spacy-transformers
[1] https://6b.eleuther.ai/
Continue this thread — 1 reply
Replies to your pinned top comment seems disabled, so allow me to ask here (sorry for the hijack):
> used a custom NLP-based ranking function to sort the comments
Can you expand on this function? (I'm familiar with NLP and most SOTA models)
Continue this thread — 1 reply
All comments shown.
Couldn't load more comments. Check your connection and try again.