abresler / markovifyr Goto Github PK
View Code? Open in Web Editor NEWMarkovify wrapper for R
Markovify wrapper for R
I've installed markovify and markovifyR using the installation instructions, but I'm getting an error when I try to run generate_markovify_model()
.
I'm trying to run
model <- generate_markovify_model( input_text = sayings$text, max_overlap_ratio = 0.85, max_overlap_total = 25 )
And get the error message
Error in initialize_python(required_module, use_environment) : Your current architecture is 64bit however this version of Python is compiled for 32bit.
Do I need to install 32bit Python or is there a way to use 64bit with markovifyR?
Nice package, thank you!
It might make sense to have the Python installation instruction under the installation header?
So for example, this:
library(tidyverse)
library(gutenbergr)
library(markovifyR)
# system("pip install markovify")
# Step 1 -- Build the Corpus ----------------------------------------------
texts_emerson <- gutenberg_works(author == "Emerson, Ralph Waldo") %>% pull(gutenberg_id) %>% gutenberg_download(.)
texts <- texts_emerson %>%
sample_n(.,5000) %>%
pull(text) %>%
discard(. == "")
# Step 2 -- Build the Model -----------------------------------------------
markov_model <-
generate_markovify_model(
input_text = texts,
markov_state_size = 2L,
max_overlap_total = 25,
max_overlap_ratio = .85
)
Works fine, but this:
library(tidyverse)
library(gutenbergr)
library(markovifyR)
# system("pip install markovify")
# Step 1 -- Build the Corpus ----------------------------------------------
texts_shake <- gutenberg_works(author == "Shakespeare, William") %>% pull(gutenberg_id) %>% gutenberg_download(.)
texts <-
texts_shake %>%
sample_n(.,5000) %>%
pull(text) %>%
discard(. == "")
# Step 2 -- Build the Model -----------------------------------------------
markov_model <-
generate_markovify_model(
input_text = texts,
markov_state_size = 2L,
max_overlap_total = 25,
max_overlap_ratio = .85
)
Seems to crash my R session. Does it crash for you all?
My session:
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2 yaml_2.1.19
Running the readme example I get the error:
Error in future_map_dfr(., function(x) { : could not find function "future_map_dfr"
The function future_map_dfr
is called here and here but doesn't appear to be in the package or any dependencies.
I'm guessing markovifyr is just missing a dependency on furrr
, which has a function by this name. The readme code works if I install and load furrr
.
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.