"Comparing Top Similar Summaries by Multiple Authors using Excel Files"
This code is designed to analyze Excel files generated by the "Summarizing Academic Articles and Exporting to Excel" code. It allows for comparisons of top similar sentences across multiple readings by one or more authors using the Sentence Transformers model from Hugging Face and Cosine Similarity to calculate similarity scores between different Summary files.
The code reads all Excel summary files in the same folder as the Python file, extracts the Summary column, and prompts the user to search for a specific quote. It then displays three boxes: 1) the quote itself, 2) top similar quotes from the same file, and 3) top similar quotes from other files.
In the example above, I used two summary files from Ernest Gellner and Eric Hobsbawm. I searched for Hobsbawm's quote about historians' need to distinguish fact and fiction, and the top generated result from other files was Gellner's essay collection, which included a discussion about history's authenticity.
Conclusion: With the ability to quickly identify similarities in how multiple authors have expressed similar ideas across different documents, this code serves as a valuable research assistant.