gpt4 book ai didi

r - R 中用于文本分析的常见名字列表?

转载 作者:行者123 更新时间:2023-12-03 08:46:01 24 4
gpt4 key购买 nike

在分析文本时,识别文本数据中的人名非常有用。

预打包在 tidytext 中的对象包括:

  • 英语否定词、情态动词和副词 ( nma_words )
  • 词性 ( parts_of_speech )
  • 情绪 ( sentiments ),以及
  • 停用词(请参阅:?stop_words)

R 中是否有类似的对象(或其他地方的可访问格式)包含规范的名称列表?

作为引用,这里是现有的 data.frame提供 tidytext

nma_words
# # A tibble: 44 x 2
# word modifier
# <chr> <chr>
# 1 cannot negator
# 2 could not negator
# 3 did not negator
# 4 does not negator
# 5 had no negator
# 6 have no negator
# 7 may not negator
# 8 never negator
# 9 no negator
# 10 not negator
# # … with 34 more rows


parts_of_speech
# # A tibble: 208,259 x 2
# word pos
# <chr> <chr>
# 1 3-d Adjective
# 2 3-d Noun
# 3 4-f Noun
# 4 4-h'er Noun
# 5 4-h Adjective
# 6 a' Adjective
# 7 a-1 Noun
# 8 a-axis Noun
# 9 a-bomb Noun
# 10 a-frame Noun
# # … with 208,249 more rows


sentiments
# # A tibble: 6,786 x 2
# word sentiment
# <chr> <chr>
# 1 2-faces negative
# 2 abnormal negative
# 3 abolish negative
# 4 abominable negative
# 5 abominably negative
# 6 abominate negative
# 7 abomination negative
# 8 abort negative
# 9 aborted negative
# 10 aborts negative
# # … with 6,776 more rows


stop_words
# # A tibble: 1,149 x 2
# word lexicon
# <chr> <chr>
# 1 a SMART
# 2 a's SMART
# 3 able SMART
# 4 about SMART
# 5 above SMART
# 6 according SMART
# 7 accordingly SMART
# 8 across SMART
# 9 actually SMART
# 10 after SMART
# # … with 1,139 more rows

最佳答案

像这样的数据集非常复杂,必须小心使用。此类数据的来源之一是 genderdata包,其中包含多个姓名数据集,其中包括来自美国社会保障管理局的几个数据集。

library(genderdata)

head(ssa_national)
#> name year female male
#> 1 aaban 2007 0 5
#> 2 aaban 2009 0 6
#> 3 aaban 2010 0 9
#> 4 aaban 2011 0 11
#> 5 aaban 2012 0 11
#> 6 aabha 2011 7 0

reprex package于2020年4月27日创建(v0.3.0)

关于r - R 中用于文本分析的常见名字列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61449533/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com