International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
Volume 185 - Issue 30 |
Published: Aug 2023 |
Authors: Ahmad Farhan Alshammari |
![]() |
Ahmad Farhan Alshammari . Implementation of Text Recommendation using Word Frequency and Cosine Similarity in Python. International Journal of Computer Applications. 185, 30 (Aug 2023), 50-55. DOI=10.5120/ijca2023923065
@article{ 10.5120/ijca2023923065, author = { Ahmad Farhan Alshammari }, title = { Implementation of Text Recommendation using Word Frequency and Cosine Similarity in Python }, journal = { International Journal of Computer Applications }, year = { 2023 }, volume = { 185 }, number = { 30 }, pages = { 50-55 }, doi = { 10.5120/ijca2023923065 }, publisher = { Foundation of Computer Science (FCS), NY, USA } }
%0 Journal Article %D 2023 %A Ahmad Farhan Alshammari %T Implementation of Text Recommendation using Word Frequency and Cosine Similarity in Python%T %J International Journal of Computer Applications %V 185 %N 30 %P 50-55 %R 10.5120/ijca2023923065 %I Foundation of Computer Science (FCS), NY, USA
The goal of this research is to develop a text recommendation program using word frequency and cosine similarity in Python. Text recommendation is the process that provides suggestions to the user. The word frequency is used to measure the importance of words in the text, and cosine similarity is used to measure the similarity between texts. The basic steps of text recommendation are explained: preprocessing text, creating list of words, creating bag of words, creating word frequency, calculating cosine similarity, creating similarity score, sorting similarity score, and printing recommendations. The developed program was tested on an experimental text from Wikipedia. The program successfully performed the basic steps of text recommendation and provided the required results.