API models exist which can achieve this.
https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K
It takes an array of categories or "bag of words" and a text string to analyze. It then returns a sorted percentage of relevance for this provided keywords.
Input Data
{
"text": "this bank provides an excelent service to its clients when opening a new account and with other operations",
"classes": [
"bank account",
"online banking",
"technical support",
"mortgage",
"retirement savings",
"mutual funds",
"student loan",
"credit card",
"financial news"
],
"minCutOff": "0.001"
}
API Response
{
"bank account": 0.6448822158372491,
"technical support": 0.40099627067600924,
"financial news": 0.28635987039897565,
"mortgage": 0.2676284175575462,
"student loan": 0.257628495744561,
"online banking": 0.32395217514082025,
"credit card": 0.2144582134037077,
"mutual funds": 0.09250890827081894,
"retirement savings": 0.13690496892541437
}
importance
is the kind of concepts/terms that represent the document andrelevance
indicates some ordering of the keywords. $\endgroup$