Extracting Hacker News Book Recommendations with the ChatGPT API
BRANK
I love books and I enjoy reading through the Hacker News(HN) book recommendation threads. On HN, there’s almost 200 stories so far this year that have the separate word “book” in the title, and aren’t linked to another page. I wondered what the most commonly recommended or mention books are. Mainly wondering if SICP or PCL would be the top recommendation.After reading of the man who categorised his favourite podcast into dewey decimal using GPT, I was aware that the GPT API could be used to categorise data and output the information in json format. So using the HN data fetched from the hackernews API, I used the subset of stories that seem to be book recommendation threads and extracted book titles, authors and urls from the text using calls to the Chat Completions API.Here’s the top 50 book recommendations:#TitleAuthorCountFirst Mention1Structure and Interpretation of Computer ProgramsAbelson and Sussman37656752Gödel, Escher, BachDouglas Hofstadter293567953How to Win Friends and…