Views
No views yet
1import joblib
2import nltk
3nltk.download('punkt')
4extract_keywords_model = joblib.load('huyremy_keywords_model.pkl')
5
6# Sử dụng model để trích xuất từ khóa từ văn bản
7text = """
8 Hello! I’m HuyRemy, a Software and Hardware Developer based
9 in Ha Noi. I have completed everything in Electronic Engineering and
10 and Electrical Engineering. In the fact I dev this mod for fun and...try it...it work. Good luck.
11 """
12keywords = extract_keywords_model(text)
13
14# In ra màn hình những từ khóa có tần suất xuất hiện cao nhất
15for keyword, count in keywords.most_common():
16 print(keyword)