Package: TextAnalysisR 0.1.5.9000

TextAnalysisR: A Text Mining Workflow Tool

Provides a text mining and natural language processing workflow for documents. Includes preprocessing via 'quanteda', lexical analysis (term frequency-inverse document frequency, log-odds ratios, lexical diversity) via 'tidytext', topic modeling via 'stm' and the 'BERTopic' approach, semantic similarity and document clustering on transformer representations, an interactive 'Shiny' interface with 'ggplot2' visualization, optional 'spaCy' preprocessing, and local 'sentence-transformers' or web-based ('OpenAI', 'Gemini') model providers for retrieval-augmented generation, as described in Shin et al. (2026) <doi:10.1177/07319487251412879>.

Authors:Mikyung Shin [aut, cre]

TextAnalysisR_0.1.5.9000.tar.gz
TextAnalysisR_0.1.5.9000.zip(r-4.7-any)TextAnalysisR_0.1.5.9000.zip(r-4.6-any)TextAnalysisR_0.1.5.9000.zip(r-4.5-any)
TextAnalysisR_0.1.5.9000.tgz(r-4.6-any)TextAnalysisR_0.1.5.9000.tgz(r-4.5-any)
TextAnalysisR_0.1.5.9000.tar.gz(r-4.7-any)TextAnalysisR_0.1.5.9000.tar.gz(r-4.6-any)
TextAnalysisR_0.1.5.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
TextAnalysisR/json (API)

# Install 'TextAnalysisR' in R:
install.packages('TextAnalysisR', repos = c('https://mshin77.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mshin77/textanalysisr/issues

Pkgdown/docs site:https://mshin77.github.io

Datasets:

On CRAN:

Conda:

bert-modellexiconollamapythonsemantictext-miningtopic-modelingword-networks

7.05 score 2 stars 36 scripts 447 downloads 178 exports 94 dependencies

Last updated from:ba20828f94. Checks:2 ERROR, 7 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develERROR209
source / vignettesOK301
linux-releaseERROR232
macos-releaseOK197
macos-oldrelOK161
windows-develOK182
windows-releaseOK149
windows-oldrelOK149
wasm-releaseOK175

Exports:%>%add_memoalign_categoriesanalyze_document_clusteringanalyze_semantic_evolutionanalyze_sentimentanalyze_sentiment_llmanalyze_similarity_gapsapply_codesapply_rulingassess_embedding_stabilityassign_noiseauto_tune_embedding_topicscalculate_assignment_consistencycalculate_clustering_metricscalculate_coherencecalculate_cosine_similaritycalculate_cross_similaritycalculate_dispersion_metricscalculate_document_similaritycalculate_keyword_stabilitycalculate_lexical_dispersioncalculate_log_odds_ratiocalculate_semantic_driftcalculate_similarity_robustcalculate_text_readabilitycalculate_topic_probabilitycalculate_topic_stabilitycalculate_weighted_log_oddscalculate_word_frequencycall_llm_apicheck_python_envcheck_vision_modelsclear_lexdiv_cachecluster_embedding_topicscluster_embeddingscode_agreementcode_provenancecode_retestcode_saturationcode_themesdescribe_imagedetect_languagedetect_language_llmdetect_multi_wordsdetect_pdf_content_typedetect_pdf_content_type_pydomain_neutral_termsdraw_holdoutdrop_duplicate_articlesestimate_topic_effectsexport_document_clusteringextract_cross_category_similaritiesextract_keywords_keynessextract_keywords_tfidfextract_morphologyextract_named_entitiesextract_noun_chunksextract_pos_tagsextract_subjects_objectsextract_tables_from_pdf_pyextract_topic_terms_dffind_optimal_kfind_similar_wordsfind_topic_matchesfit_embedding_modelfit_embedding_topicsfit_semantic_modelfit_temporal_modelgenerate_cluster_labelsgenerate_cluster_labels_autogenerate_codesgenerate_embeddingsgenerate_semantic_topic_keywordsgenerate_topic_contentgenerate_topic_labelsget_available_dfmget_available_tokensget_best_embeddingsget_content_type_promptget_content_type_user_templateget_memosget_sentencesget_sentiment_colorget_sentiment_colorsget_spacy_model_infoget_topic_prevalenceget_topic_termsget_topic_textsget_word_similaritygroup_evidenceidentify_topic_trendsimport_filesimport_imagesimport_news_exportinit_spacy_nlplemmatize_tokenslexical_diversity_analysislexical_frequency_analysisload_topic_modellog_roundlog_units_readmerge_codesnew_coding_projectplot_cluster_termsplot_cross_category_heatmapplot_document_sentiment_trajectoryplot_emotion_radarplot_entity_frequenciesplot_errorplot_keyness_keywordsplot_keyword_comparisonplot_lexical_dispersionplot_lexical_diversity_distributionplot_log_odds_ratioplot_model_comparisonplot_morphology_featureplot_mwe_frequencyplot_ngram_frequencyplot_pos_frequenciesplot_quality_metricsplot_readability_by_groupplot_readability_distributionplot_semantic_vizplot_sentiment_boxplotplot_sentiment_by_categoryplot_sentiment_contributionplot_sentiment_distributionplot_sentiment_violinplot_similarity_heatmapplot_term_trends_continuousplot_tfidf_keywordsplot_top_readability_documentsplot_topic_effects_categoricalplot_topic_effects_continuousplot_topic_probabilityplot_weighted_log_oddsplot_word_frequencyplot_word_probabilityprep_textsprocess_pdf_unifiedread_coding_projectreduce_dimensionsremove_metadata_linesrender_displacy_deprender_displacy_entround_summaryruling_settledrun_apprun_neural_topics_internalrun_rag_searchrun_text_workflowsave_coding_projectsave_topic_modelsemantic_document_clusteringsemantic_similarity_analysissentiment_embedding_analysissentiment_lexicon_analysissentiment_valence_analysissetup_python_envshow_web_bannersniff_encodingspacy_extract_entitiesspacy_has_vectorsspacy_initializedspacy_lemmatizespacy_parse_fullsplit_textssummarize_morphologyto_utf8transform_topic_modeluncoded_unitsunite_colsvalidate_categoriesvalidate_cross_modelsvalidate_semantic_coherenceword_co_occurrence_networkword_correlation_network

Dependencies:backportsbase64encbitbit64broombslibcachemclicliprcommonmarkcpp11crayoncrosstalkdigestdplyrDTevaluatefarverfastmapfastmatchfontawesomefsgenericsggplot2gluegtablehighrhmshtmltoolshtmlwidgetshttpuvigraphisobandISOcodesjaneaustenrjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclemagrittrMatrixmemoisemimensyllableotelpillarpkgconfigplyrprettyunitsprogresspromisesproxyCpurrrquantedaquanteda.textstatsR6rappdirsRColorBrewerRcppRcppArmadilloreadrreshape2rlangrmarkdownS7sassscalesshinySnowballCsourcetoolsstopwordsstringistringrtibbletidyrtidyselecttidytexttinytextokenizerstzdbutf8vctrsviridisLitevroomwidyrwithrxfunxml2xtableyaml

Qualitative Coding
Codebook | AI Coding | Review | Agreement | Combining Coder Files

Last update: 2026-10-15
Started: 2026-08-15

Lexical Analysis
Setup | Linguistic Annotation | Part-of-Speech Tags | Morphological Features | Named Entity Recognition | Frequency Trends | Keywords | TF-IDF | Statistical Keyness | Comparison | Lexical Diversity | Readability | Log Odds Ratio | Lexical Dispersion | Multi-Word Expressions

Last update: 2026-10-15
Started: 2025-11-30

AI Integration
Providers | Setup | Default Models | Responsible AI Design

Last update: 2026-10-07
Started: 2025-12-29

Topic Modeling
Setup | Model Configuration | Word-Topic | Content Generation | Document-Topic | Quotes | Estimated Effects | Categorical Covariates | Continuous Covariates | Embedding-Based Topics | STM vs Embedding

Last update: 2026-10-07
Started: 2025-11-30

Installation
Choose a Setup | R Package | Web App | Optional Features | Linguistic Analysis (spaCy) | Python Features | Troubleshooting

Last update: 2026-08-19
Started: 2025-11-30

Python Environment
Quick Setup | Check Status | Common Issues | "Another Python already initialized" | Environment in OneDrive | spaCy Models | Deep Learning (Optional) | Diagnostics

Last update: 2026-08-19
Started: 2025-11-30

Getting Started
Language support | Install | Launch App | Quick Example | Features

Last update: 2026-07-31
Started: 2025-11-30

Multimodal Analysis
How It Works | Functions | Provider Comparison

Last update: 2026-07-30
Started: 2025-11-30

Preprocessing
Workflow | Unite Text Columns | Tokenization Options | Stopword Removal | Lemmatization | Document-Feature Matrix (DFM) | Multi-word Expressions

Last update: 2026-07-30
Started: 2025-11-30

Security
Input Validation | API Key Security | Network Security | Data Protection | Infrastructure

Last update: 2026-07-30
Started: 2025-11-30

Semantic Analysis
Setup | Word Co-occurrence | Word Correlation | Document Similarity | Comparative Analysis | Semantic Search | Sentiment & Emotion | Document Groups

Last update: 2026-07-30
Started: 2025-11-30

Accessibility
Keyboard Navigation | Visual Features | Screen Reader Support | Language Support

Last update: 2026-06-02
Started: 2025-11-30

Readme and manuals

Help Manual

Help pageTopics
Acronym Listacronym
Attach an Analytic Memo to a Unit or Categoryadd_memo
Compare Human Codes With Machine Categoriesalign_categories
Analyze Document Clusteringanalyze_document_clustering
Analyze Semantic Evolutionanalyze_semantic_evolution
Analyze Text Sentimentanalyze_sentiment
LLM-based Sentiment Analysisanalyze_sentiment_llm
Analyze Similarity Gaps Between Categoriesanalyze_similarity_gaps
Apply a Codebook to Textsapply_codes
Apply Keep, Split, and Merge Verdicts to a Groupingapply_ruling
Assess Embedding Topic Model Stabilityassess_embedding_stability
Assign Unclustered Documents to Confirmed Categoriesassign_noise
Auto-tune BERTopic Hyperparametersauto_tune_embedding_topics
Calculate Assignment Consistencycalculate_assignment_consistency
Calculate Clustering Quality Metricscalculate_clustering_metrics
Topic Coherence in Embedding Spacecalculate_coherence
Calculate Cross-Matrix Cosine Similaritycalculate_cross_similarity
Calculate Dispersion Metricscalculate_dispersion_metrics
Calculate Keyword Stabilitycalculate_keyword_stability
Calculate Lexical Dispersioncalculate_lexical_dispersion
Calculate Log Odds Ratio Between Categoriescalculate_log_odds_ratio
Calculate Semantic Driftcalculate_semantic_drift
Calculate Document Similarity with Fallbackscalculate_similarity_robust
Calculate Text Readabilitycalculate_text_readability
Calculate Topic Probabilitiescalculate_topic_probability
Calculate Topic Stabilitycalculate_topic_stability
Calculate Weighted Log Odds Ratiocalculate_weighted_log_odds
Analyze and Visualize Word Frequencies Across a Continuous Variablecalculate_word_frequency
Call LLM APIcall_llm_api
Clear Lexical Diversity Cacheclear_lexdiv_cache
Embedding-Based Topic Discoverycluster_embedding_topics
Embedding-Based Document Clusteringcluster_embeddings
Inter-Coder Agreement From Code Assignmentscode_agreement
Coding Run Provenancecode_provenance
AI Coding Retest Stabilitycode_retest
Code Saturation Curvecode_saturation
Themes From Coded Unitscode_themes
Describe Image Using Vision LLMdescribe_image
Detect Corpus Language From Stopword Overlapdetect_language
Detect Corpus Language With an LLMdetect_language_llm
Detect Multi-Word Expressionsdetect_multi_words
Detect PDF Content Typedetect_pdf_content_type
Topic Words Treated as Neutral in Sentiment Scoringdomain_neutral_terms
Draw a Blind Holdout From Units Never Readdraw_holdout
Drop Duplicate Articlesdrop_duplicate_articles
Estimate topic prevalence effects from an STM modelestimate_topic_effects
Export Document Clustering Analysisexport_document_clustering
Extract Cross-Category Similarities from Full Similarity Matrixextract_cross_category_similarities
Extract Keywords Using Statistical Keynessextract_keywords_keyness
Extract Keywords Using TF-IDFextract_keywords_tfidf
Extract Morphological Featuresextract_morphology
Extract Named Entities from Tokensextract_named_entities
Extract Noun Chunksextract_noun_chunks
Extract Part-of-Speech Tags from Tokensextract_pos_tags
Extract Subjects and Objectsextract_subjects_objects
Build a topic-term data frame from any supported topic modelextract_topic_terms_df
Find Optimal Number of Topicsfind_optimal_k
Find Similar Wordsfind_similar_words
Find Similar Topicsfind_topic_matches
Fit Embedding-Based Topic Modelfit_embedding_model
Fit Semantic Modelfit_semantic_model
Fit Temporal Topic Modelfit_temporal_model
Generate Cluster Label Suggestions (Human-in-the-Loop)generate_cluster_labels
Generate Cluster Labelsgenerate_cluster_labels_auto
Build a Codebook From Textsgenerate_codes
Generate Embeddingsgenerate_embeddings
Generate Semantic Topic Keywords (c-TF-IDF)generate_semantic_topic_keywords
Generate Content from Topic Termsgenerate_topic_content
Generate Topic Labels Using AIgenerate_topic_labels
Get Best Available Embeddingsget_best_embeddings
Get Default System Prompt for Content Typeget_content_type_prompt
Get Default User Prompt Template for Content Typeget_content_type_user_template
Retrieve Analytic Memosget_memos
Get Sentencesget_sentences
Get spaCy Model Informationget_spacy_model_info
Get Topic Prevalence (Gamma) from STM Modelget_topic_prevalence
Select Top Terms for Each Topicget_topic_terms
Convert Topic Terms to Text Stringsget_topic_texts
Calculate Word Similarityget_word_similarity
Evidence for Ruling on Each Groupgroup_evidence
Identify Topic Trendsidentify_topic_trends
Process Filesimport_files
Import Image Files as Textimport_images
Import a News-Database Exportimport_news_export
Lemmatize Tokens with Batch Processinglemmatize_tokens
Lexical Analysis Functionslexical_analysis
Lexical Diversity Analysislexical_diversity_analysis
Lexical Frequency Analysislexical_frequency_analysis
Load a Fitted Topic Modelload_topic_model
Record a Refinement Roundlog_round
Record Units Read During Refinementlog_units_read
Combine Coder Assignment Filesmerge_codes
Start a Qualitative Coding Projectnew_coding_project
Plot Cluster Top Termsplot_cluster_terms
Plot Cross-Category Similarity Comparisonplot_cross_category_heatmap
Plot Document Sentiment Trajectoryplot_document_sentiment_trajectory
Plot Emotion Radar Chartplot_emotion_radar
Plot Named Entity Frequenciesplot_entity_frequencies
Create Error Plot for Plotlyplot_error
Plot Statistical Keynessplot_keyness_keywords
Plot Keyword Comparison (TF-IDF vs Frequency)plot_keyword_comparison
Plot Lexical Dispersionplot_lexical_dispersion
Plot Lexical Diversity Distributionplot_lexical_diversity_distribution
Plot Log Odds Ratioplot_log_odds_ratio
Plot Topic Model Comparison Scatterplot_model_comparison
Plot Morphology Feature Distributionplot_morphology_feature
Plot Multi-Word Expression Frequencyplot_mwe_frequency
Plot N-gram Frequencyplot_ngram_frequency
Plot Part-of-Speech Tag Frequenciesplot_pos_frequencies
Plot Topic Model Quality Metricsplot_quality_metrics
Plot Readability by Groupplot_readability_by_group
Plot Readability Distributionplot_readability_distribution
Plot Semantic Analysis Visualizationplot_semantic_viz
Plot Sentiment Box Plot by Categoryplot_sentiment_boxplot
Plot Sentiment by Categoryplot_sentiment_by_category
Plot Word Contributions to Sentimentplot_sentiment_contribution
Plot Sentiment Distributionplot_sentiment_distribution
Plot Sentiment Violin Plot by Categoryplot_sentiment_violin
Plot Document Similarity Heatmapplot_similarity_heatmap
Plot Term Frequency Trends by Continuous Variableplot_term_trends_continuous
Plot TF-IDF Keywordsplot_tfidf_keywords
Plot Top Documents by Readabilityplot_top_readability_documents
Plot Topic Effects for Categorical Variablesplot_topic_effects_categorical
Plot Topic Effects for Continuous Variablesplot_topic_effects_continuous
Plot Per-Document Per-Topic Probabilitiesplot_topic_probability
Plot Weighted Log Oddsplot_weighted_log_odds
Plot Word Frequencyplot_word_frequency
Plot Word Probabilities by Topicplot_word_probability
Preprocess Text Dataprep_texts
Process PDF File (Unified Entry Point)process_pdf_unified
Read a Qualitative Coding Projectread_coding_project
Dimensionality Reduction Analysisreduce_dimensions
Remove Database Metadata Linesremove_metadata_lines
Render displaCy Dependency Visualizationrender_displacy_dep
Render displaCy Entity Visualizationrender_displacy_ent
Coverage Trend Across Refinement Roundsround_summary
Has the Refinement Settled?ruling_settled
Launch the TextAnalysisR apprun_app
RAG Semantic Searchrun_rag_search
Complete Text Mining Workflowrun_text_workflow
Save a Qualitative Coding Projectsave_coding_project
Save a Fitted Topic Modelsave_topic_model
Semantic Document Clusteringsemantic_document_clustering
Semantic Similarity Analysissemantic_similarity_analysis
Embedding-Based Sentiment Analysissentiment_embedding_analysis
Analyze Sentiment Using Tidytext Lexiconssentiment_lexicon_analysis
Valence-Shifter Sentiment Analysissentiment_valence_analysis
Setup Python Environmentsetup_python_env
Detect a File's Text Encodingsniff_encoding
Extract Named Entities with spaCyspacy_extract_entities
Check if Model Has Word Vectorsspacy_has_vectors
Check if spaCy is Initializedspacy_initialized
Lemmatize Texts with spaCyspacy_lemmatize
Parse Texts with spaCyspacy_parse_full
Special education technology bibliographic dataSpecialEduTech
Split Texts Into Units of Analysissplit_texts
An example structure of a structural topic modelstm_15
Stopwords Liststopwords_list
Summarize Morphology Featuressummarize_morphology
Repair Text to UTF-8to_utf8
Assign New Documents to a Fitted Topic Modeltransform_topic_model
Units With No Code Assigneduncoded_units
Unite Text Columnsunite_cols
Confirm Categories With Supervised Learningvalidate_categories
Cross-Analysis Validationvalidate_cross_models
Validate Semantic Coherencevalidate_semantic_coherence
Analyze and Visualize Word Co-occurrence Networksword_co_occurrence_network
Analyze and Visualize Word Correlation Networksword_correlation_network