An internal function called by collex_MI to compute Mutual Information (MI) score

MI_compute(a, a_exp)

Arguments

a

observed frequency co-occurrence of a collocate and the nodeword.

a_exp

expected frequency co-occurrence of the collocate and the nodeword.

Value

A double-numeric value of MI score

Examples

# the numbers below are made-up examples # for the collocate pattern "tindak pidana" 'legal act' a <- 702 total_freq_w1 <- 1183 total_freq_w2 <- 1251 corpus_size <- 5763049 a_exp <- (total_freq_w1 * total_freq_w2)/corpus_size (MI_score <- MI_compute(a, a_exp))
#> [1] 11.41663