This code can calculate loglikelihood value according to giving a keyword which is on table.columns. Also, given a sample row which designed as dictionary will be calculated it's class and this program will show every keywords' p-value
If you want to edit to your code you should look to 22-26 statements. Enjoy!