Skip to content

SemanticDistance

Compute Semantic Distance Between Text Constituents

v0.1.1 · Sep 1, 2025 · LGPL (>= 3)

Description

Cleans and formats language transcripts guided by a series of transformation options (e.g., lemmatize words, omit stopwords, split strings across rows). 'SemanticDistance' computes two distinct metrics of cosine semantic distance (experiential and embedding). These values reflect pairwise cosine distance between different elements or chunks of a language sample. 'SemanticDistance' can process monologues (e.g., stories, ordered text), dialogues (e.g., conversation transcripts), word pairs arrayed in columns, and unordered word lists. Users specify options for how they wish to chunk distance calculations. These options include: rolling ngram-to-word distance (window of n-words to each new word), ngram-to-ngram distance (2-word chunk to the next 2-word chunk), pairwise distance between words arrayed in columns, matrix comparisons (i.e., all possible pairwise distances between words in an unordered list), turn-by-turn distance (talker to talker in a dialogue transcript). 'SemanticDistance' includes visualization options for analyzing distances as time series data and simple semantic network dynamics (e.g., clustering, undirected graph network).

Downloads

509

Last 30 days

7674th

1.6K

Last 90 days

4.9K

Last year

Trend: +11.1% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 27, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Jun 21, 2026
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘SemanticDistance_Data_Viz.Rmd’ using rmarkdown
--- finished re-building ‘SemanticDistance_Data_Viz.Rmd’

--- re-building ‘SemanticDistance_Dialogues.Rmd’ using rmarkdown
--- finished re-buildi
...[truncated]...
an be copied to the same source as `x` (may be
  slow).
--- failed re-building ‘SemanticDistance_Word_Pairs.Rmd’

SUMMARY: processing the following file failed:
  ‘SemanticDistance_Word_Pairs.Rmd’

Error: Vignette re-building failed.
Execution halted
ERROR r-release-linux-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘SemanticDistance_Data_Viz.Rmd’ using rmarkdown
--- finished re-building ‘SemanticDistance_Data_Viz.Rmd’

--- re-building ‘SemanticDistance_Dialogues.Rmd’ using rmarkdown
--- finished re-buildi
...[truncated]...
an be copied to the same source as `x` (may be
  slow).
--- failed re-building ‘SemanticDistance_Word_Pairs.Rmd’

SUMMARY: processing the following file failed:
  ‘SemanticDistance_Word_Pairs.Rmd’

Error: Vignette re-building failed.
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Packages required but not available: 'textstem', 'textclean'

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 10, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 8, 2026
ERROR r-devel-linux-x86_64-debian-clang

whether the namespace can be loaded with stated dependencies

Warning in utils::download.file(url = paste0(repo_url, ds, ".rda"), destfile = temp_file,  :
  downloaded length 26219679 != reported length 34855920
Warning in utils::download.file(url = paste0(repo_url, ds, ".rda"), destfile = temp_file,  :
  URL '
...[truncated]...
s was reached

A namespace must be able to be loaded with just the base namespace
loaded: otherwise if the namespace gets loaded by a saved object, the
session will be unable to start.

Probably some imports need to be declared in the NAMESPACE file.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies ape cluster dendextend dplyr httr igraph lsa magrittr purrr rlang stringi stringr textstem tidyselect tm +3 more dependencies SemanticDistance

Version History

1 tracked
new 0.1.1 Mar 10, 2026

R Observatory began tracking this package on Mar 10, 2026; it first appeared on CRAN Sep 1, 2025. Releases before tracking aren’t shown.