frameR is an R package that provides tools for measuring emphasis frames in political text using transformer-based sentence embeddings and cosine similarity. Rather than classifying sentences into frame categories — which measures frame salience — frameR measures the semantic association between issue-relevant discourse and theoretically specified frame categories. This operationalizes emphasis frames as they are conceptualized in the political communication literature: as semantic links between a core issue and peripheral evaluative considerations.
The package implements a four-step pipeline:
Embed a corpus of text using a sentence embedding model
Identify issue-relevant sentences using keyword matching, semantic similarity, or both
Specify theoretically motivated frame categories as keyword sets and embed them
Measure frame strength as cosine similarity between issue discourse and frame keywords, with bootstrap uncertainty quantification and permutation-based significance testing
frameR is designed for cross-national and cross-lingual comparative research. It accepts any sentence embedding model from the sentence-transformers library and includes utilities for domain adaptation to political text.