windowedCoOccurenceNetwork: A sliding window approach to calculate the co-occurence of...

Description Usage Arguments Value

Description

A sliding window approach to calculate the co-occurence of words

Usage

1
2
3
4
windowedCoOccurenceNetwork(tokenlist, window.size = 10,
  output.per.context = F, direction = "<>", doc.col = getOption("doc.col",
  "doc_id"), position.col = getOption("position.col", "position"),
  word.col = getOption("word.col", "word"))

Arguments

tokenlist
window.size

The distance within which words should occur from each other to be counted as a co-occurence.

output.per.context

Logical. If True, co-occurences are reported per context (beware that this takes longer and can lead to huge output)

direction

a string indicating whether only the left ('<') or right ('>') side of the window, or both ('<>'), should be used.

Value

An edgelist (data.frame) with columns x, y and weight, in which weight represents the number of times y occured within a [window.size] word distance from x. If output.per.context is True, co-occurences are reported per context, and the edgelist has an additional context column.


kasperwelbers/semnet documentation built on May 20, 2019, 7:38 a.m.