Skip to contents

log P(w|A_i) / P(w|A_j) over generated text.

Usage

morie_kamath_ch6_co_occurrence_bias(w, A_i, A_j)

Arguments

w

Word.

A_i, A_j

Named count vectors or token corpora.

Value

List with estimate, p_given_Ai, p_given_Aj.

Examples

morie_kamath_ch6_co_occurrence_bias(w = 5L, A_i = c(1, 2, 3, 4, 5, 6, 7, 8),
  A_j = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0
#> 
#> $p_given_Ai
#> [1] 0.125
#> 
#> $p_given_Aj
#> [1] 0.125
#> 
#> $count_Ai
#> [1] 1
#> 
#> $count_Aj
#> [1] 1
#> 
#> $n
#> [1] 16
#> 
#> $method
#> [1] "Co-Occurrence Bias Score (Kamath Eq 6.14)"
#>