mkearney / textfeatures Goto Github PK
View Code? Open in Web Editor NEW๐ทโโ๏ธ A simple package for extracting useful features from character objects ๐ทโโ๏ธ
Home Page: https://textfeatures.mikewk.com
License: Other
๐ทโโ๏ธ A simple package for extracting useful features from character objects ๐ทโโ๏ธ
Home Page: https://textfeatures.mikewk.com
License: Other
The example here does not seem to be outputting correctly. (Note, was working, but updated my version of R along with several packages -- see session info. and now does not align with expectations from package documentation.)
## vector of some text
x <- c(
"this is A!\t sEntence https://github.com about #rstats @github",
"and another sentence here", "THe following list:\n- one\n- two\n- three\nOkay!?!"
)
## get text features
features <- textfeatures::textfeatures(x, verbose = FALSE)
features
#> # A tibble: 3 x 36
#> n_urls[,"n_urls~ [,"n_uq_urls"] [,"n_hashtags"] [,"n_uq_hashtag~
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1.15 1.15 1.15 1.15
#> 2 -0.577 -0.577 -0.577 -0.577
#> 3 -0.577 -0.577 -0.577 -0.577
#> # ... with 1,292 more variables: [,"n_mentions"] <dbl>,
#> # [,"n_uq_mentions"] <dbl>, [,"n_chars"] <dbl>, [,"n_uq_chars"] <dbl>,
#> # [,"n_commas"] <dbl>, [,"n_digits"] <dbl>, [,"n_exclaims"] <dbl>,
#> # [,"n_extraspaces"] <dbl>, [,"n_lowers"] <dbl>, [,"n_lowersp"] <dbl>,
#> # [,"n_periods"] <dbl>, [,"n_words"] <dbl>, [,"n_uq_words"] <dbl>,
#> # [,"n_caps"] <dbl>, [,"n_nonasciis"] <dbl>, [,"n_puncts"] <dbl>,
#> # [,"n_capsp"] <dbl>, [,"n_charsperword"] <dbl>, [,"sent_afinn"] <dbl>,
#> # [,"sent_bing"] <dbl>, [,"sent_syuzhet"] <dbl>, [,"sent_vader"] <dbl>,
#> # [,"n_polite"] <dbl>, [,"n_first_person"] <dbl>, [,"n_first_personp"] <dbl>,
#> # [,"n_second_person"] <dbl>, [,"n_second_personp"] <dbl>,
#> # [,"n_third_person"] <dbl>, [,"n_tobe"] <dbl>, [,"n_prepositions"] <dbl>,
#> # [,"w1"] <dbl>, [,"w2"] <dbl>, n_uq_urls[,"n_urls"] <dbl>,
#> # [,"n_uq_urls"] <dbl>, [,"n_hashtags"] <dbl>, [,"n_uq_hashtags"] <dbl>,
#> # [,"n_mentions"] <dbl>, [,"n_uq_mentions"] <dbl>, [,"n_chars"] <dbl>,
#> # [,"n_uq_chars"] <dbl>, [,"n_commas"] <dbl>, [,"n_digits"] <dbl>,
#> # [,"n_exclaims"] <dbl>, [,"n_extraspaces"] <dbl>, [,"n_lowers"] <dbl>,
#> # [,"n_lowersp"] <dbl>, [,"n_periods"] <dbl>, [,"n_words"] <dbl>,
#> # [,"n_uq_words"] <dbl>, [,"n_caps"] <dbl>, [,"n_nonasciis"] <dbl>,
#> # [,"n_puncts"] <dbl>, [,"n_capsp"] <dbl>, [,"n_charsperword"] <dbl>,
#> # [,"sent_afinn"] <dbl>, [,"sent_bing"] <dbl>, [,"sent_syuzhet"] <dbl>,
#> # [,"sent_vader"] <dbl>, [,"n_polite"] <dbl>, [,"n_first_person"] <dbl>,
#> # [,"n_first_personp"] <dbl>, [,"n_second_person"] <dbl>,
#> # [,"n_second_personp"] <dbl>, [,"n_third_person"] <dbl>, [,"n_tobe"] <dbl>,
#> # [,"n_prepositions"] <dbl>, [,"w1"] <dbl>, [,"w2"] <dbl>,
#> # n_hashtags[,"n_urls"] <dbl>, [,"n_uq_urls"] <dbl>, [,"n_hashtags"] <dbl>,
#> # [,"n_uq_hashtags"] <dbl>, [,"n_mentions"] <dbl>, [,"n_uq_mentions"] <dbl>,
#> # [,"n_chars"] <dbl>, [,"n_uq_chars"] <dbl>, [,"n_commas"] <dbl>,
#> # [,"n_digits"] <dbl>, [,"n_exclaims"] <dbl>, [,"n_extraspaces"] <dbl>,
#> # [,"n_lowers"] <dbl>, [,"n_lowersp"] <dbl>, [,"n_periods"] <dbl>,
#> # [,"n_words"] <dbl>, [,"n_uq_words"] <dbl>, [,"n_caps"] <dbl>,
#> # [,"n_nonasciis"] <dbl>, [,"n_puncts"] <dbl>, [,"n_capsp"] <dbl>,
#> # [,"n_charsperword"] <dbl>, [,"sent_afinn"] <dbl>, [,"sent_bing"] <dbl>,
#> # [,"sent_syuzhet"] <dbl>, [,"sent_vader"] <dbl>, [,"n_polite"] <dbl>,
#> # [,"n_first_person"] <dbl>, [,"n_first_personp"] <dbl>,
#> # [,"n_second_person"] <dbl>, [,"n_second_personp"] <dbl>,
#> # [,"n_third_person"] <dbl>, ...
str(features)
#> tibble [3 x 36] (S3: tbl_df/tbl/data.frame)
#> $ n_urls : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_uq_urls : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_hashtags : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_uq_hashtags : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_mentions : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_uq_mentions : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_chars : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_uq_chars : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_commas : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_digits : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_exclaims : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_extraspaces : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_lowers : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_lowersp : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_periods : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_words : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_uq_words : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_caps : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_nonasciis : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_puncts : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_capsp : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_charsperword : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ sent_afinn : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ sent_bing : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ sent_syuzhet : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ sent_vader : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_polite : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_first_person : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_first_personp : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_second_person : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_second_personp: num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_third_person : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_tobe : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ n_prepositions : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ w1 : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> $ w2 : num [1:3, 1:36] 1.155 -0.577 -0.577 1.155 -0.577 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : NULL
#> .. ..$ : chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> - attr(*, "tf_export")=List of 3
#> ..$ avg : Named num [1:36] 0.333 0.333 0.333 0.333 0.333 ...
#> .. ..- attr(*, "names")= chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> ..$ std_dev: Named num [1:36] 0.577 0.577 0.577 0.577 0.577 ...
#> .. ..- attr(*, "names")= chr [1:36] "n_urls" "n_uq_urls" "n_hashtags" "n_uq_hashtags" ...
#> ..$ dict :Classes 'WarpLDA', 'LDA', 'TopicModel', 'mlapiDecomposition', 'mlapiTransformation', 'mlapiBase', 'R6' <WarpLDA>
#> Inherits from: <LDA>
#> Public:
#> clone: function (deep = FALSE)
#> components: active binding
#> fit_transform: function (x, n_iter = 1000, convergence_tol = 0.001, n_check_convergence = 10,
#> get_top_words: function (n = 10, topic_number = 1L:private$n_topics, lambda = 1)
#> initialize: function (n_topics = 10L, doc_topic_prior = 50/n_topics, topic_word_prior = 1/n_topics,
#> plot: function (lambda.step = 0.1, reorder.topics = FALSE, doc_len = private$doc_len,
#> topic_word_distribution: active binding
#> transform: function (x, n_iter = 1000, convergence_tol = 0.001, n_check_convergence = 10,
#> Private:
#> calc_pseudo_loglikelihood: function (ptr = private$ptr)
#> check_convert_input: function (x)
#> components_: 2 1 0 2
#> doc_len: 2 2 1
#> doc_topic_distribution: function ()
#> doc_topic_distribution_with_prior: function ()
#> doc_topic_matrix: 4 1 1 16 19 9
#> doc_topic_prior: 25
#> fit_transform_internal: function (model_ptr, n_iter, convergence_tol, n_check_convergence,
#> get_c_all: function ()
#> get_c_all_local: function ()
#> get_doc_topic_matrix: function (prt, nr)
#> get_topic_word_count: function ()
#> init_model_dtm: function (x, ptr = private$ptr)
#> internal_matrix_formats: list
#> is_initialized: FALSE
#> n_iter_inference: 10
#> n_topics: 2
#> ptr: externalptr
#> reset_c_local: function ()
#> run_iter_doc: function (update_topics = TRUE, ptr = private$ptr)
#> run_iter_word: function (update_topics = TRUE, ptr = private$ptr)
#> seeds: 532771300.003818 1146267836.93245
#> set_c_all: function (x)
#> set_internal_matrix_formats: function (sparse = NULL, dense = NULL)
#> topic_word_distribution_with_prior: function ()
#> topic_word_prior: 0.5
#> transform_internal: function (x, n_iter = 1000, convergence_tol = 0.001, n_check_convergence = 10,
#> vocabulary: c sentence
#> ..- attr(*, "class")= chr [1:2] "textfeatures_model" "list"
devtools::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 3.6.3 (2020-02-29)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate English_United States.1252
#> ctype English_United States.1252
#> tz America/New_York
#> date 2020-04-06
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.3)
#> backports 1.1.6 2020-04-05 [1] CRAN (R 3.6.3)
#> callr 3.4.3 2020-03-28 [1] CRAN (R 3.6.3)
#> cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.3)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.3)
#> data.table 1.12.8 2019-12-09 [1] CRAN (R 3.6.3)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.3)
#> devtools 2.2.2 2020-02-17 [1] CRAN (R 3.6.3)
#> digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.3)
#> dplyr 0.8.5 2020-03-07 [1] CRAN (R 3.6.3)
#> ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.6.3)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.3)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.3)
#> float 0.2-3 2019-05-31 [1] CRAN (R 3.6.0)
#> fs 1.4.1 2020-04-04 [1] CRAN (R 3.6.3)
#> glue 1.4.0 2020-04-03 [1] CRAN (R 3.6.3)
#> highr 0.8 2019-03-20 [1] CRAN (R 3.6.3)
#> htmltools 0.4.0 2019-10-04 [1] CRAN (R 3.6.3)
#> knitr 1.28 2020-02-06 [1] CRAN (R 3.6.3)
#> lattice 0.20-38 2018-11-04 [2] CRAN (R 3.6.3)
#> lgr 0.3.4 2020-03-20 [1] CRAN (R 3.6.3)
#> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 3.6.3)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.3)
#> Matrix 1.2-18 2019-11-27 [2] CRAN (R 3.6.3)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.3)
#> mlapi 0.1.0 2017-12-17 [1] CRAN (R 3.6.3)
#> pillar 1.4.3 2019-12-20 [1] CRAN (R 3.6.3)
#> pkgbuild 1.0.6 2019-10-09 [1] CRAN (R 3.6.3)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.3)
#> pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.3)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 3.6.3)
#> processx 3.4.2 2020-02-09 [1] CRAN (R 3.6.3)
#> ps 1.3.2 2020-02-13 [1] CRAN (R 3.6.3)
#> purrr 0.3.3 2019-10-18 [1] CRAN (R 3.6.3)
#> R6 2.4.1 2019-11-12 [1] CRAN (R 3.6.3)
#> Rcpp 1.0.4 2020-03-17 [1] CRAN (R 3.6.3)
#> remotes 2.1.1 2020-02-15 [1] CRAN (R 3.6.3)
#> renv 0.9.3 2020-02-10 [1] CRAN (R 3.6.3)
#> RhpcBLASctl 0.20-17 2020-01-17 [1] CRAN (R 3.6.2)
#> rlang 0.4.5 2020-03-01 [1] CRAN (R 3.6.3)
#> rmarkdown 2.1 2020-01-20 [1] CRAN (R 3.6.3)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.3)
#> rsparse 0.4.0 2020-04-01 [1] CRAN (R 3.6.3)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.3)
#> SnowballC 0.7.0 2020-04-01 [1] CRAN (R 3.6.3)
#> stringi 1.4.6 2020-02-17 [1] CRAN (R 3.6.2)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.3)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 3.6.3)
#> text2vec 0.6 2020-02-18 [1] CRAN (R 3.6.3)
#> textfeatures 0.3.3 2020-04-06 [1] Github (mkearney/textfeatures@a960fb2)
#> tfse 0.5.0 2019-02-11 [1] CRAN (R 3.6.3)
#> tibble 3.0.0 2020-03-30 [1] CRAN (R 3.6.3)
#> tidyselect 1.0.0 2020-01-27 [1] CRAN (R 3.6.3)
#> tokenizers 0.2.1 2018-03-29 [1] CRAN (R 3.6.3)
#> usethis 1.5.1 2019-07-04 [1] CRAN (R 3.6.3)
#> utf8 1.1.4 2018-05-24 [1] CRAN (R 3.6.3)
#> vctrs 0.2.4 2020-03-10 [1] CRAN (R 3.6.3)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.3)
#> xfun 0.12 2020-01-13 [1] CRAN (R 3.6.3)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 3.6.2)
#>
#> [1] C:/Users/BSHALLOW/Documents/R/study/blog ideas/hotels-explore/renv/library/R-3.6/x86_64-w64-mingw32
#> [2] C:/Users/BSHALLOW/AppData/Local/Temp/RtmpcrxYMu/renv-system-library
#> [3] C:/Users/BSHALLOW/AppData/Local/Temp/RtmpOWi3Su/renv-system-library
Created on 2020-04-06 by the reprex package (v0.3.0)
Thank you so much for your excellent work on this package! ๐
I have some questions about the way the w
results are presented/documented. The function documentation uses some language about word2vec, but in the functions that create these results, only functions from text2vec for topic modeling are called, not any vector embedding functions.
The text2vec package has functions for LDA topic modeling and also for word embeddings, specifically an implementation of GloVe. If I am understanding correctly, it looks like only the first are used in this package, but the language describing the results refers to the second.
What are your thoughts on this? Do you think the language and naming should be updated?
I've been trying to find a definition of what each of the features mean, especially the wX columns...is this documented anywhere?
Would it be possible to have word_dims_newtext()
and word_dims()
exported?
I'm trying to do the same in https://github.com/tidymodels/textrecipes, and I'm already depending on textfeatures
for other steps. I can write the PR to export them if you are okay with it ๐
I'm missing some information about where the politeness_dict
is coming from. If you supply the source I don't mind adding the documentation!
Thanks for a great package.
I was wondering. Is there a reasoning behind second_personp
counting third person singular pronouns?
Wouldn't it be better if second_personp
only counted instances of "yourselves" for example and the third person singular count would be in third_person
, with the third person plural (currently being counted in third_person
) then being counted in a new function third_personp
Hey @mkearney ๐
I saw that {textfeatures} has been kicked off CRAN yesterday. Were you aware that that happened?
I would be happy to help you bring it back on CRAN!
Hi, Could you explain/clarify how to apply train preprocessing to new data?
newdata - If a textfeatures_model is supplied to text, supply this with new data to which you would like ???to apply the textfeatures_model.???
Cause after textfeatures function
I get a data frame.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.