wordorientation: Detect Attraction and Repulsion Between Words in Text

Provides tools to quantify how strongly pairs of words attract or repel each other in a text corpus, based on co-occurrence patterns. For each word pair, the phi coefficient (a correlation measure for binary variables) is computed from a document-term matrix and tested for significance, then classified as showing attraction (co-occurring more than chance would predict), repulsion (co-occurring less than chance would predict), or no significant relationship. A full pipeline is provided from raw text to a labeled network visualization. Unlike general-purpose pairwise correlation tools, 'wordorientation' is built specifically for text: it handles tokenization and stopword removal, applies significance-based classification rather than reporting a raw correlation coefficient alone, and produces a ready-to-plot attraction/ repulsion network.

Version: 0.1.0
Depends: R (≥ 3.5.0)
Imports: stats, graphics, igraph, scales
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown
Published: 2026-08-08
DOI: 10.32614/CRAN.package.wordorientation (may not be active yet)
Author: Yosley Carrero [aut, cre]
Maintainer: Yosley Carrero <c3046338 at newcastle.ac.uk>
BugReports: https://github.com/yosleycarrero2025/wordorientation/issues
License: MIT + file LICENSE
URL: https://github.com/yosleycarrero2025/wordorientation
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: wordorientation results

Documentation:

Reference manual: wordorientation.html , wordorientation.pdf

Downloads:

Package source: wordorientation_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): wordorientation_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=wordorientation to link to this page.