Reading has at all times been an integral a part of my life. From immersing myself in history books and spy novels to expanding my knowledge through statistical and machine learning texts, I even have continually sought to broaden my horizons and quench my thirst for knowledge. Authors like Murakami have captured my imagination, while leadership and management books have offered invaluable insights into personal and skilled growth.
Throughout my life, there have been pivotal moments which have shaped my perspectives and interests. By analyzing the trends within the books I’ve been drawn to, I hope to uncover how these pivotal moments have impacted my literary journey. Using Python, I’ve created a script to use topic modeling to the notes I’ve imported from neoReader and Readwise, with the aim of determining the topics covered within the books I’ve read over the past two years. On this blog, I’ll present the method and results of this exploration, shedding light on the themes and genres which have shaped my reading history.
I often find myself reminiscing about once I would wander through bookstores, picking up books and feeling the magic of turning pages in my hands. Physical books hold a special charm; nevertheless, their limitations became more apparent as I delved deeper into the world of digital books.
One in every of the shortcomings of physical books is the issue in taking and organizing notes. Digital books, however, simplify this process, making it easier to construct and manage a body of information. Moreover, the convenience of carrying digital books while traveling or relaxing on the beach can’t be overstated.
To research the book genres I’ve read, I turned to topic modeling, a method that identifies patterns and structures inside a group of documents. By applying this method to my reading notes, I aimed to uncover common denominators among the many books I’ve read and explore the impact of pivotal moments on my literary interests.
Topic modeling techniques comparable to Latent Dirichlet Allocation (LDA) and Non-negative Matrix Factorization (NMF) enable the invention of hidden topics inside a group of documents. By implementing these algorithms in my Python script, I could generate clusters of keywords, which served as a foundation for further evaluation.
nlp = en_core_web_md.load()# Tags I would like to remove from the text
removal = ['ADV', 'PRON', 'CCONJ', 'PUNCT',
'PART', 'DET', 'ADP', 'SPACE', 'NUM', 'SYM']
tokens = []
for highlight in nlp.pipe(df_highlights['Highlights']):
proj_tok = [token.lemma_.lower(
) for token in highlight if token.pos_ not in removal and not token.is_stop and token.is_alpha and len(token) > 2]
tokens.append(proj_tok)
tokens_concatenated = list(map(lambda x: ' '.join(x), tokens))
tokens_cleaned = list(map(lambda x: get_cleaned_string(x), tokens_concatenated))
dictionary = Dictionary(tokens)
dictionary.filter_extremes(no_below=5, no_above=0.5, keep_n=1000)
corpus = [dictionary.doc2bow(doc) for doc in tokens]
# Optimal model
topics_count = 15
lda_model = LdaMulticore(corpus=corpus, id2word=dictionary, iterations=100, num_topics=topics_count, employees = 4, passes=100)
# Print topics
lda_model.print_topics(-1)
# Visualize topics
lda_display = pyLDAvis.gensim_models.prepare(lda_model, corpus, dictionary, R=10)
pyLDAvis.display(lda_display)
# Save the report
pyLDAvis.save_html(lda_display, f'data/generated_html/index_{topics_count}.html')
The whole code may be found here
With the keyword clusters identified, I employed ChatGPT, a strong AI language model, to remodel these clusters into meaningful topics. By providing ChatGPT with a prompt containing the keyword clusters, I obtained clear and concise topic titles that best encapsulated the essence of every cluster.
These AI-generated topic titles offered worthwhile insights into the genres and subjects covered within the books I’ve read, giving me a deeper understanding of my reading preferences and habits.
Q “ [[‘sleep’, ‘rem’, ‘hour’, ‘brain’, ‘night’, ‘percent’, ‘lose’, ‘morning’, ‘time’, ‘deep’], [‘new’, ‘network’, ‘link’, ‘idea’, ‘time’, ‘practice’, ‘assign’, ‘level’, ‘take’, ‘group’], [‘know’, ‘life’, ‘thing’, ‘love’, ‘people’, ‘learn’, ‘way’, ‘change’, ‘deal’, ‘single’], [‘time’, ‘change’, ‘end’, ‘percent’, ‘mean’, ‘build’, ‘experience’, ‘world’, ‘habit’, ‘seek’], [‘strategy’, ‘help’, ‘individual’, ‘life’, ‘goal’, ‘word’, ‘world’, ‘job’, ‘real’, ‘example’], [‘good’, ‘knowledge’, ‘human’, ‘strategy’, ‘work’, ‘future’, ‘find’, ‘new’, ‘pattern’, ‘value’], [‘action’, ‘resource’, ‘story’, ‘policy’, ‘great’, ‘life’, ‘high’, ‘good’, ‘give’, ‘ability’], [‘understand’, ‘say’, ‘percent’, ‘world’, ‘mind’, ‘truth’, ‘idea’, ‘control’, ‘human’, ‘field’], [‘day’, ‘turn’, ‘natural’, ‘change’, ‘important’, ‘new’, ‘book’, ‘potential’, ‘life’, ‘rate’], [‘cost’, ‘modern’, ‘dream’, ‘john’, ‘truth’, ‘end’, ‘create’, ‘build’, ‘product’, ‘fight’], [‘people’, ‘attention’, ‘second’, ‘book’, ‘person’, ‘read’, ‘small’, ‘day’, ‘state’, ‘mean’], [‘thing’, ‘person’, ‘go’, ‘individual’, ‘group’, ‘kill’, ‘type’, ‘identity’, ‘good’, ‘time’], [‘problem’, ‘experience’, ‘man’, ‘solve’, ‘learn’, ‘model’, ‘skill’, ‘ability’, ‘think’, ‘water’], [‘good’, ‘work’, ‘idea’, ‘think’, ‘feel’, ‘people’, ‘teach’, ‘life’, ‘look’, ‘fail’], [‘think’, ‘need’, ‘come’, ‘idea’, ‘strength’, ‘know’, ‘fact’, ‘good’, ‘hit’, ‘new’]]”
Based on the provided list of word clusters, I suggest the next topics to explain each set of words:
Discovering Expected and Unexpected Themes
Among the topics, comparable to ‘Sleep Quality and Brain Function,’ got here as no surprise, given the extensive notes I had made while reading “Why We Sleep.” This reaffirmed the effectiveness of the subject modeling and ChatGPT-driven evaluation. Other themes, like ‘Networking and Collaborative Learning,’ resonated with my personal interests in meeting latest people and looking for collaborative opportunities.
Exploring Evolving Interests
The evaluation also make clear the evolution of my interests over time. As a lifelong learner, my initial deal with engineering and computer science expanded to incorporate topics like ‘Personal Growth and Relationships.’ This shift highlights my growing awareness of the importance of getting the appropriate people around me to attain great things.
Uncovering Core Values and Beliefs
The presence of topics comparable to ‘Time and Adaptability,’ ‘Goal Setting and Personal Development,’ and ‘Knowledge, Strategy, and Innovation’ provided insights into the core values and beliefs which have shaped my reading decisions. I even have at all times admired individuals who successfully reinvent themselves and recognize the importance of adaptability within the face of fixing circumstances. My interest in strategy, coupled with the understanding that goals without strategy amount to wishful considering, can be evident in these topics.
Reflecting on Reading Patterns and Personal Growth
The varied range of topics revealed through this evaluation not only painted a vivid picture of my literary journey but in addition provided a possibility for introspection and private growth. By understanding the themes which have piqued my curiosity, I can higher appreciate the influences which have shaped my perspectives, in addition to discover areas where I may need to expand my knowledge or explore latest ideas.
As I reflect on this exploration of my reading history and the patterns and themes which have emerged from the evaluation, I’m reminded of how reading has played an integral role in shaping my life. Alongside regular workouts, reading stays one in every of my best passions. It fuels my curiosity, broadens my perspective, and equips me with the knowledge and insights to interact in meaningful conversations on a various range of topics.
Looking back, I even have come to understand that my personal success on a yearly basis is extremely correlated with the variety of books I’ve read. This connection highlights the profound impact that reading has on my personal growth, well-being, and achievements. By consistently engaging with latest ideas, stories, and perspectives, I’m capable of constantly learn, adapt, and thrive in an ever-changing world.
I even have made it a priority to read each day, as I recognize that without this every day nourishment for my mind, I experience a way of hunger, a eager for the insights and inspiration that only books can provide. The journey through my literary landscape, powered by topic modeling and ChatGPT, has reaffirmed the importance of reading in my life and has inspired me to proceed looking for out diverse and thought-provoking literature.
In an effort to attach with fellow readers and share my passion for books, I invite you to follow my reading list on Goodreads. This platform provides an area for us to exchange book recommendations, discuss our favourite reads, and suggest titles that we found interesting and fulfilling.
In the long run, this exploration has not only provided an enchanting glimpse into the themes and genres which have shaped my reading journey but has also served as a strong reminder of the transformative power of books. By continually feeding my mind and difficult my perspectives, I’m higher equipped to navigate the complexities of life and achieve greater success, each personally and professionally. I stay up for connecting with you on Goodreads and embarking on latest literary adventures together.
Bossa Nova Music