Skip to contents

TODO:

Usage

dp(tokens, parts, v, norm = TRUE)

Arguments

tokens

character or factor

parts

character or factor

v

integer vector with per document frequencies

norm

logical whether or not to normalize, see Details

Value

numeric

Details

TODO:

Examples

n <- 50
v <- sample(1:100, n, replace = TRUE)
tokens <- sample(letters, n, replace = TRUE)
parts <- sample(LETTERS[1:3], n, replace = TRUE)
dp(tokens, parts, v)
#>          y          d          p          c          u          r          f 
#> 1.00000000 0.46385418 1.00000000 0.60540084 0.68862234 0.27770734 0.51443038 
#>          b          e          a          q          n          v          h 
#> 0.12964007 0.54892240 0.10388134 0.41943684 0.09513135 1.00000000 0.89992998 
#>          w          s          g          x          t          i          m 
#> 0.37265823 0.31493671 1.00000000 0.34379747 1.00000000 0.85822785 0.31493671 
#>          l          o          j 
#> 0.61495417 0.63739602 0.85822785