association-score-functions {RKorAPClient} | R Documentation |
Association score functions
Description
Functions to calculate different collocation association scores between
a node (target word) and words in a window around the it.
The functions are primarily used by collocationScoreQuery()
.
pmi: pointwise mutual information
mi2: pointwise mutual information squared (Daille 1994), also referred to as mutual dependency (Thanopoulos et al. 2002)
mi3: pointwise mutual information cubed (Daille 1994), also referred to as log-frequency biased mutual dependency) (Thanopoulos et al. 2002)
logDice: log-Dice coefficient, a heuristic measure that is popular in lexicography (Rychlý 2008)
ll: log-likelihood (Dunning 1993) using Stefan Evert's (2004) simplified implementation
Usage
defaultAssociationScoreFunctions()
pmi(O1, O2, O, N, E, window_size)
mi2(O1, O2, O, N, E, window_size)
mi3(O1, O2, O, N, E, window_size)
logDice(O1, O2, O, N, E, window_size)
ll(O1, O2, O, N, E, window_size)
Arguments
O1 |
observed absolute frequency of node |
O2 |
observed absolute frequency of collocate |
O |
observed absolute frequency of collocation |
N |
corpus size |
E |
expected absolute frequency of collocation (already adjusted to window size) |
window_size |
total window size around node (left neighbour count + right neighbour count) |
Value
association score
References
Daille, B. (1994): Approche mixte pour l’extraction automatique de terminologie: statistiques lexicales et filtres linguistiques. PhD thesis, Université Paris 7.
Thanopoulos, A., Fakotakis, N., Kokkinakis, G. (2002): Comparative evaluation of collocation extraction metrics. In: Proc. of LREC 2002: 620–625.
Rychlý, Pavel (2008): A lexicographer-friendly association score. In Proceedings of Recent Advances in Slavonic Natural Language Processing, RASLAN, 6–9. https://www.fi.muni.cz/usr/sojka/download/raslan2008/13.pdf.
Dunning, T. (1993): Accurate methods for the statistics of surprise and coincidence. Comput. Linguist. 19, 1 (March 1993), 61-74.
Evert, Stefan (2004): The Statistics of Word Cooccurrences: Word Pairs and Collocations. PhD dissertation, IMS, University of Stuttgart. Published in 2005, URN urn:nbn:de:bsz:93-opus-23714. Free PDF available from https://purl.org/stefan.evert/PUB/Evert2004phd.pdf
See Also
Other collocation analysis functions:
collocationAnalysis,KorAPConnection-method
,
collocationScoreQuery,KorAPConnection-method
,
synsemanticStopwords()
Examples
## Not run:
new("KorAPConnection", verbose = TRUE) %>%
collocationScoreQuery("Perlen", c("verziertes", "Säue"),
scoreFunctions = append(defaultAssociationScoreFunctions(),
list(localMI = function(O1, O2, O, N, E, window_size) {
O * log2(O/E)
})))
## End(Not run)