Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA #55

Open
trngbro opened this issue Jan 10, 2024 · 0 comments
Open

QA #55

trngbro opened this issue Jan 10, 2024 · 0 comments

Comments

@trngbro
Copy link

trngbro commented Jan 10, 2024

var vntk = require('vntk');
var tfidf = new vntk.TfIdf();

tfidf.addDocument('1 Đại tướng Trần Đại Quang - Ủy viên Bộ Chính trị, Bí thư Đảng ủy Công an Trung ương, Bộ trưởng Bộ Công an.');
tfidf.addDocument('2 Đại tướng Trần Đại Quang - Ủy viên Bộ Chính trị, Bí thư Đảng ủy Công an Trung ương, Bộ trưởng Bộ Công an.');
tfidf.addDocument('3 Đại tướng Trần Đại Quang - Ủy viên Bộ Chính trị, Bí thư Đảng ủy Công an Trung ương, Bộ trưởng Bộ Công an.');
tfidf.addDocument('4 Đại tướng Trần Đại Quang - Ủy viên Bộ Chính trị, Bí thư Đảng ủy Công an Trung ương, Bộ trưởng Bộ Công an.');

tfidf.tfidfs('4 Đại tướng Trần Đại Quang - Ủy viên Bộ Chính trị, Bí thư Đảng ủy Công an Trung ương, Bộ trưởng Bộ Công an.', function(i, measure) {
console.log('document #' + i + ' is ' + measure);
});

document #0 is 28.743688601374252
document #1 is 28.743688601374252
document #2 is 28.743688601374252
document #3 is 28.743688601374252

xác suất này chưa xử lý với number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant