'a la Carte' on Text (ConText) Embedding Regression


[Up] [Top]

Documentation for package ‘conText’ version 1.4.3

Help Pages

bootstrap_contrast Bootstrap similarity and ratio computations
bootstrap_nns Bootstrap nearest neighbors
bootstrap_ols Bootstrap OLS
bootstrap_similarity Boostrap similarity vector
build_conText build a 'conText-class' object
build_dem build a 'dem-class' object
build_fem build a 'fem-class' object
compute_contrast Compute similarity and similarity ratios
compute_similarity Compute similarity vector (sub-function of bootstrap_similarity)
compute_transform Compute transformation matrix A
conText Embedding regression
contrast_nns Contrast nearest neighbors
cos_sim Compute the cosine similarity between one or more ALC embeddings and a set of features.
cr_glove_subset GloVe subset
cr_sample_corpus Congressional Record sample corpus
cr_transform Transformation matrix
dem Build a document-embedding matrix
dem_group Average document-embeddings in a dem by a grouping variable
dem_sample Randomly sample documents from a dem
embed_target Embed target using either: (a) a la carte OR (b) simple (untransformed) averaging of context embeddings
feature_sim Given two feature-embedding-matrices, compute "parallel" cosine similarities between overlapping features.
fem Create an feature-embedding matrix
find_cos_sim Find cosine similarities between target and candidate words
find_nns Return nearest neighbors based on cosine similarity
get_context Get context words (words within a symmetric window around the target word/phrase) sorrounding a user defined target.
get_cos_sim Given a tokenized corpus, compute the cosine similarities of the resulting ALC embeddings and a defined set of features.
get_local_vocab Identify words common to a collection of texts and a set of pretrained embeddings.
get_ncs Given a set of tokenized contexts, find the top N nearest contexts.
get_nns Given a tokenized corpus and a set of candidate neighbors, find the top N nearest neighbors.
get_nns_ratio Given a corpus and a binary grouping variable, computes the ratio of cosine similarities over the union of their respective N nearest neighbors.
get_seq_cos_sim Calculate cosine similarities between target word and candidates words over sequenced variable using ALC embedding approach
ncs Given a set of embeddings and a set of tokenized contexts, find the top N nearest contexts.
nns Given a set of embeddings and a set of candidate neighbors, find the top N nearest neighbors.
nns_ratio Computes the ratio of cosine similarities for two embeddings over the union of their respective top N nearest neighbors.
permute_contrast Permute similarity and ratio computations
permute_ols Permute OLS
plot_nns_ratio Plot output of 'get_nns_ratio()'
prototypical_context Find most "prototypical" contexts.
run_ols Run OLS
tokens_context Get the tokens of contexts sorrounding user defined patterns