%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname tidyEmoji %global packver 0.4.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.4.0 Release: 1%{?dist}%{?buildtag} Summary: Discover, Count, Categorise, Score, Translate and Relate Emoji in Text License: GPL (>= 3) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 4.1.0 Requires: R-core >= 4.1.0 BuildArch: noarch BuildRequires: R-CRAN-emoji >= 16.0.0 BuildRequires: R-CRAN-tidyr >= 1.3.0 BuildRequires: R-CRAN-dplyr >= 1.1.0 BuildRequires: R-CRAN-lifecycle >= 1.0.3 BuildRequires: R-CRAN-rlang BuildRequires: R-stats BuildRequires: R-CRAN-tibble BuildRequires: R-utils Requires: R-CRAN-emoji >= 16.0.0 Requires: R-CRAN-tidyr >= 1.3.0 Requires: R-CRAN-dplyr >= 1.1.0 Requires: R-CRAN-lifecycle >= 1.0.3 Requires: R-CRAN-rlang Requires: R-stats Requires: R-CRAN-tibble Requires: R-utils %description A tidy toolkit for working with the emoji in any text column, such as social-media posts, product reviews, chat logs or survey responses. Unicode is awkward to handle and not every code point is an emoji, which makes emoji statistics fiddly to obtain. 'tidyEmoji' extracts, counts, categorises, sentiment-scores and emotion-scores emoji, converts them to and from text (for accessibility and NLP preprocessing), searches the emoji catalogue, maps emoji co-occurrence and sequences (graph-ready edge lists and n-grams), measures where and how densely emoji are used, and builds document-by-emoji feature tables for machine learning, with grapheme-aware detection (so skin-tone and multi-person sequences stay intact), returning tidy data frames that slot straight into a 'tidyverse' workflow. It also quantifies how much annotators disagreed about an emoji (interpretation risk), extracts the words around each emoji, tracks emoji use over time, measures text-emoji sentiment mismatch, and applies explicit emoji-preprocessing policies for language-model pipelines. The bundled emoji sentiment lexicon is from the Emoji Sentiment Ranking of Kralj Novak et al. (2015) , released under CC BY-SA 4.0; the emotion lexicon is from EmoTag1200 of Shoeb & de Melo (2020) , released under the MIT licence. %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}