Package: wordorientation 0.1.0
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. Methods for word co-occurrence and the phi coefficient follow Evert (2008) <doi:10.1075/z.143.13eve> and standard corpus linguistics practice for collocation and association measures.
Authors:
wordorientation_0.1.0.tar.gz
wordorientation_0.1.0.zip(r-4.7-any)wordorientation_0.1.0.zip(r-4.6-any)wordorientation_0.1.0.zip(r-4.5-any)
wordorientation_0.1.0.tgz(r-4.6-any)wordorientation_0.1.0.tgz(r-4.5-any)
wordorientation_0.1.0.tar.gz(r-4.7-any)wordorientation_0.1.0.tar.gz(r-4.6-any)
wordorientation_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
wordorientation/json (API)
| # Install 'wordorientation' in R: |
| install.packages('wordorientation', repos = c('https://yosleycarrero2025.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/yourusername/wordorientation/issues
Last updated from:8f27a0e226. Checks:7 WARNING, 2 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | WARNING | 122 | ||
| source / vignettes | OK | 185 | ||
| linux-release | WARNING | 169 | ||
| macos-release | WARNING | 118 | ||
| macos-oldrel | WARNING | 172 | ||
| windows-devel | WARNING | 78 | ||
| windows-release | WARNING | 58 | ||
| windows-oldrel | WARNING | 69 | ||
| wasm-release | OK | 107 |
Exports:analyze_word_orientationcooccurrence_countsexample_social_postsplot_orientation_networktokenize_postsword_orientation
Dependencies:clicpp11farverglueigraphlabelinglatticelifecyclemagrittrMatrixpkgconfigR6RColorBrewerrlangscalesvctrsviridisLite
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Run the full word attraction/repulsion pipeline | analyze_word_orientation |
| Compute pairwise co-occurrence contingency counts | cooccurrence_counts |
| Example social media posts | example_social_posts |
| Plot a word attraction/repulsion network | plot_orientation_network |
| Tokenize a text column into a long-format token table | tokenize_posts |
| Classify word pairs as attracted, repelled, or unrelated | word_orientation |