Skip to content

Commit cfc0667

Browse files
committed
Use with quanteda 4.3.1
1 parent f4beb00 commit cfc0667

File tree

2 files changed

+84
-67
lines changed

2 files changed

+84
-67
lines changed

README.md

Lines changed: 78 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pak::pak("quanteda/quanteda.tidy")
112112

113113
``` r
114114
library(quanteda)
115-
#> Package version: 4.3.0
115+
#> Package version: 4.3.1
116116
#> Unicode version: 14.0
117117
#> ICU version: 71.1
118118
#> Parallel computing: 10 of 10 threads used.
@@ -184,15 +184,16 @@ summary
184184

185185
<td style="text-align:left;">
186186

187-
The document is a speech delivered by a political leader during an
188-
inauguration ceremony. The speech emphasizes a commitment to
189-
transferring power from Washington D.C. back to the people, highlighting
190-
a desire to rebuild the nation by prioritizing American interests. The
191-
speaker calls for economic revitalization, increased national strength,
192-
and unity among citizens. Key themes include patriotism, reducing
193-
foreign influence, improving infrastructure, and ensuring safety. The
194-
speech concludes with a pledge to make America strong, wealthy, proud,
195-
and safe again.
187+
The document is an inaugural address in which the speaker emphasizes a
188+
national effort to rebuild the country and restore its promise for all
189+
citizens. The speaker criticizes past administrations for benefiting a
190+
small group in Washington while neglecting the broader population,
191+
resulting in job loss and economic decline. The promise of the speech is
192+
to transfer power back to the people, emphasizing ‘America first’
193+
policies. Key themes include protecting US borders, revitalizing
194+
infrastructure, enhancing national pride, and enhancing American
195+
industry and employment. The speech concludes with a call for unity and
196+
a commitment to making America strong, wealthy, proud, and safe again.
196197
</td>
197198

198199
</tr>
@@ -201,21 +202,21 @@ and safe again.
201202

202203
<td style="text-align:left;">
203204

204-
2025-Trump
205+
2021-Biden
205206
</td>
206207

207208
<td style="text-align:left;">
208209

209-
This speech celebrates the inauguration of a new president, emphasizing
210-
the core theme of “unity” and the resilience of American democracy. The
211-
president reflects on recent challenges, including a global pandemic,
212-
economic struggles, and political unrest, and calls for healing and
213-
cooperation across political divides. By invoking historical parallels
214-
and previous leaders, the speech underscores the importance of coming
215-
together to address social justice, climate change, and global
216-
re-engagement. The president pledges to serve all citizens equally,
217-
honor democratic principles, and propose a future defined by collective
218-
effort and shared values.
210+
The speech is a call for unity and commitment to overcoming current
211+
challenges in the United States, including a health crisis, political
212+
divisions, racial injustice, and climate change. The speaker emphasizes
213+
the importance of democracy, resilience, and collective action in
214+
addressing these issues. They acknowledge past struggles and triumphs,
215+
reiterating the need for unity and truth to secure a better future. The
216+
speech invokes historical moments and figures to inspire resolve and
217+
purpose, encouraging all Americans to work together for the common good.
218+
The address concludes with a pledge to serve all Americans and a call
219+
for prayers and a moment of silence for those lost to the pandemic.
219220
</td>
220221

221222
</tr>
@@ -224,20 +225,30 @@ effort and shared values.
224225

225226
<td style="text-align:left;">
226227

227-
2021-Biden.txt
228+
2025-Trump
228229
</td>
229230

230231
<td style="text-align:left;">
231232

232-
The document is a speech reaffirming the values and resilience of
233-
American democracy, delivered during a historic moment of transition in
234-
leadership. It emphasizes the importance of unity, healing, and
235-
confronting the current challenges facing the nation, including
236-
political extremism, racism, and the COVID-19 pandemic. The speech calls
237-
for a collective effort to rebuild and strengthen the nation, while
238-
honoring past sacrifices and promoting truth and justice. It concludes
239-
with a commitment to serving all Americans and a vision for a hopeful
240-
and united future.
233+
This document appears to be a speech by Donald Trump, addressing various
234+
political figures and the public, marking the beginning of his new
235+
presidential term. In his address, he outlines his agenda which includes
236+
prioritizing “America first,” restoring national sovereignty, and
237+
ensuring safety by ending the weaponization of the Justice Department.
238+
He aims to confront issues of national trust, immigration, public
239+
safety, and the economy, including initiatives like declaring
240+
emergencies at the southern border and energy industry reforms to boost
241+
domestic production.
242+
243+
Trump announces measures to restore what he perceives as lost American
244+
values and promotes national unity, prosperity, and greatness. He refers
245+
to his election as a mandate to reverse prior policies, citing support
246+
from diverse demographic groups. Trump’s agenda further emphasizes
247+
strengthening the military, revamping trade relations via tariffs, and
248+
addressing environmental and educational policies according to his
249+
vision. The speech conveys a rallying call to renew American pride and
250+
strength, framing his administration as a transformative era for the
251+
United States.
241252
</td>
242253

243254
</tr>
@@ -265,20 +276,20 @@ data_corpus_inaugural <- data_corpus_inaugural %>%
265276
glimpse(data_corpus_inaugural)
266277
#> Rows: 3
267278
#> Columns: 14
268-
#> $ doc_id <chr> "2017-Trump", "2025-Trump", "2021-Biden.txt"
269-
#> $ text <chr> "Chief Just…", "Chief Just…", "Chief Just…"
279+
#> $ doc_id <chr> "2017-Trump", "2021-Biden", "2025-Trump"
280+
#> $ text <chr> "Chief Just…", "Chief Just…", "Thank you.…"
270281
#> $ Year <int> 2017, 2021, 2025
271282
#> $ President <chr> "Trump", "Biden", "Trump"
272283
#> $ FirstName <chr> "Donald J.", "Joseph R.", "Donald J."
273284
#> $ Party <fct> Republican, Democratic, Republican
274285
#> $ id <chr> "1", "2", "3"
275-
#> $ summary <chr> "The document is a speech delivered by a political leader du
286+
#> $ summary <chr> "The document is an inaugural address in which the speaker e
276287
#> $ topic1 <dbl> 1, 1, 1
277288
#> $ topic2 <dbl> 2, 2, 2
278289
#> $ topic3 <dbl> 3, 3, 3
279-
#> $ score1 <dbl> 0.70, 0.10, 0.15
280-
#> $ score2 <dbl> 0.1, 0.1, 0.1
281-
#> $ score3 <dbl> 0.20, 0.80, 0.75
290+
#> $ score1 <dbl> 0.7, 0.2, 0.4
291+
#> $ score2 <dbl> 0.10, 0.35, 0.30
292+
#> $ score3 <dbl> 0.20, 0.45, 0.30
282293
```
283294

284295
### Using `ai_score()` for scoring documents
@@ -353,14 +364,14 @@ evidence
353364

354365
<td style="text-align:left;">
355366

356-
The document primarily emphasizes a populist approach with a strong
357-
focus on nationalism and the transfer of power “back to the people”. It
358-
criticizes the political elite and international engagement, advocating
359-
for “America first” policies and economic nationalism such as protecting
360-
American industries and prioritizing American workers. These themes
361-
align more with right-leaning political ideologies focused on
362-
sovereignty, economic protectionism, and nationalism. Therefore, it does
363-
not align with the political left.
367+
The document represents a speech that emphasizes nationalism, populism,
368+
and protectionism, reflecting right-wing and conservative ideologies
369+
rather than leftist ones. The speech highlights transferring power away
370+
from the political establishment to the people, criticizes foreign
371+
engagements, and advocates for ‘America first’ policies, focusing on
372+
national strength and pride. These elements do not align with the
373+
political left’s focus on global cooperation and progressive social
374+
policies.
364375
</td>
365376

366377
</tr>
@@ -369,22 +380,26 @@ not align with the political left.
369380

370381
<td style="text-align:left;">
371382

372-
2025-Trump
383+
2021-Biden
373384
</td>
374385

375386
<td style="text-align:left;">
376387

377-
1
388+
2
378389
</td>
379390

380391
<td style="text-align:left;">
381392

382-
The document emphasizes themes commonly associated with the political
383-
left, such as addressing racial justice, confronting political
384-
extremism, and recognizing systemic racism. It also mentions addressing
385-
climate change, promoting unity, and ensuring health care for all. While
386-
these align with progressive values, the focus is largely on unity and
387-
bipartisanship, which moderates the overall leftist alignment.
393+
The document, which is a speech, emphasizes themes of unity, social
394+
justice, racial equality, and combating climate change - all causes
395+
typically associated with the political left. It stresses the need to
396+
address systemic racism, a ‘cry for racial justice,’ and the existential
397+
threat posed by climate change. The call for restoring alliances and
398+
focusing on unity and collective action aligns with leftist principles
399+
of international cooperation and social equality. The repeated calls for
400+
unity and healing from recent national divisions, while not explicitly
401+
leftist, are set in contrast to addressing right-leaning extremism and
402+
white supremacy.
388403
</td>
389404

390405
</tr>
@@ -393,23 +408,24 @@ bipartisanship, which moderates the overall leftist alignment.
393408

394409
<td style="text-align:left;">
395410

396-
2021-Biden.txt
411+
2025-Trump
397412
</td>
398413

399414
<td style="text-align:left;">
400415

401-
2
416+
0
402417
</td>
403418

404419
<td style="text-align:left;">
405420

406-
The document advocates for social equality, evident in its emphasis on
407-
racial justice, combating white supremacy, and efforts to unite a
408-
divided nation. It also supports progressive policies like economic
409-
rebuilding, creating jobs, and addressing climate change. These thematic
410-
elements align it more with the political left. However, it also
411-
stresses unity and bipartisan collaboration, which slightly moderates
412-
its alignment with extreme left positions.
421+
The document aligns with right-wing political ideology, emphasizing
422+
national sovereignty, reduction in government intervention (e.g., ending
423+
the Green New Deal), and traditional values. The speech prioritizes
424+
America First policies, a strong military, and economic nationalism,
425+
including tariffs and energy independence. These points of focus
426+
contrast with left-wing advocacy for social equality, economic
427+
regulation, and progressive policies. Thus, the score regarding how much
428+
this document aligns with the political left is 0: not at all left.
413429
</td>
414430

415431
</tr>

inst/WORDLIST

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
AWS
22
Anthropic’s
3+
Biden
34
CMD
45
Cloudflare
6+
Codecov
57
Databricks
68
DeepSeek
79
Groq
@@ -15,13 +17,12 @@ Seraphine
1517
Tidyverse
1618
VLLM
1719
ai
20+
docnames
1821
docvar
19-
ellmer
20-
fn
22+
first’
23+
left’s
2124
llm
2225
obejcts
2326
ollama
24-
openai
25-
org
2627
quanteda
27-
tidyverse
28+

0 commit comments

Comments
 (0)