Initial release

This commit is contained in:
Francesco Carmelo Capria 2025-06-21 18:15:33 +02:00
commit ae5e4b8873
52 changed files with 17572 additions and 0 deletions

6
backend/app/utils/nlp.py Normal file
View file

@ -0,0 +1,6 @@
import yake
def extract_keywords(text: str, num_keywords: int = 5) -> list:
kw_extractor = yake.KeywordExtractor(lan="en", n=1, top=num_keywords)
keywords = kw_extractor.extract_keywords(text)
return [kw for kw, _ in keywords]