Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't replicate #14

Open
emretoros opened this issue May 31, 2020 · 2 comments
Open

Can't replicate #14

emretoros opened this issue May 31, 2020 · 2 comments

Comments

@emretoros
Copy link

emretoros commented May 31, 2020

Hi,
I was trying to set some text networks with my data but received some error.
Then, when I tried to replicate the code on package's github page. I received the same error.
I am on R v3.6, and made a clean install on every pack needed for textnetworks.
The error I receive for both cases (for my own data and for sotu data) is as follows


library(textnets)
Loading required package: dplyr

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Loading required package: udpipe
Loading required package: ggraph
Loading required package: ggplot2
Loading required package: networkD3
Warning messages:
1: replacing previous import ‘dplyr::union’ by ‘igraph::union’ when loading ‘textnets’
2: replacing previous import ‘dplyr::as_data_frame’ by ‘igraph::as_data_frame’ when loading ‘textnets’
3: replacing previous import ‘dplyr::groups’ by ‘igraph::groups’ when loading ‘textnets’

data("sotu")
sotu_firsts <- sotu %>% group_by(president) %>% slice(1L)
sotu_firsts_nouns <- PrepText(sotu_firsts, groupvar = "president", textvar = "sotu_text", node_type = "groups", tokenizer = "words", pos = "nouns", remove_stop_words = TRUE, compound_nouns = TRUE)
Downloading udpipe model from https://raw.githubusercontent.com/jwijffels/udpipe.models.ud.2.4/master/inst/udpipe-ud-2.4-190531/english-ewt-ud-2.4-190531.udpipe to C:/Users/.../english-ewt-ud-2.4-190531.udpipe
Visit https://github.com/jwijffels/udpipe.models.ud.2.4 for model license details
trying URL 'https://raw.githubusercontent.com/jwijffels/udpipe.models.ud.2.4/master/inst/udpipe-ud-2.4-190531/english-ewt-ud-2.4-190531.udpipe'
Content type 'application/octet-stream' length 16477964 bytes (15.7 MB)
downloaded 15.7 MB

Error in check_input(x) :
Input must be a character vector of any length or a list of character
vectors, each of which has a length of 1.
In addition: Warning message:
'unnest_tokens_' is deprecated.
Use 'unnest_tokens' instead.
See help("Deprecated")


my input is a character vector....

Any help would be greatly appreciated.
best
E.

@cbail
Copy link
Owner

cbail commented Jun 19, 2020

I just pushed a fix for this- can you please try a clean install and rerun the example code? thank you!

@emretoros
Copy link
Author

Hi, It worked flawlessly, thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants