Implementation of Keyword Extraction using Term Frequency-Inverse Document Frequency (TF-IDF) in Python
Ahmad Farhan AlShammari · International Journal of Computer Applications · 2023
The goal of this research is to develop a keyword extraction program using Term Frequency-Inverse Document Frequency (TF-IDF) in Python.The purpose of keyword extraction is to identify the set of words (keywords) that describe the content of the text.The TF-IDF method is used to measure the importance of words in the text.The basic steps of keyword extraction are explained: preprocessing text, creating list of words, creating bag of words, creating word frequency (TF), creating inverse document frequency (IDF), creating word frequency-inverse document frequency (TF-IDF), creating keywords, and sorting keywords.The developed program was tested on an experimental text from Wikipedia.The program successfully performed the basic steps of keyword extraction and provided the required results.