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

ntlk4r Error Msg #1

Open
ms1948 opened this issue Apr 12, 2020 · 8 comments
Open

ntlk4r Error Msg #1

ms1948 opened this issue Apr 12, 2020 · 8 comments

Comments

@ms1948
Copy link

ms1948 commented Apr 12, 2020

The command

remotes::install_github("news-r/nltk4r")
produce the following error message:

Error in parse(outFile) :
/private/var/folders/_v/bz29xsks25n4sbrd_85t2nxc0000gq/T/Rtmp1Sxr2E/R.INSTALLd9c2d5f06ea/nltk4r/R/data.R:326:43: unexpected '='
325: #' @export
326: movie_reviews_categories <- function(..., =
^
ERROR: unable to collate and parse R files for package ‘nltk4r’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nltk4r’
    Error: Failed to install 'nltk4r' from GitHub:
    (converted from warning) installation of package ‘/var/folders/_v/bz29xsks25n4sbrd_85t2nxc0000gq/T//RtmpnkB7YU/filed40667eeb47/nltk4r_0.0.1.tar.gz’ had non-zero exit status
@mustaszewski
Copy link

I get the same error message and have not yet found a solution to it.

@ms1948
Copy link
Author

ms1948 commented Jun 2, 2020 via email

@Manuellama
Copy link

The function called movie_reviews_categories seems wrong, due to the unexpected '=':

movie_reviews_categories <- function(..., = NULL, to_r = FALSE){

It should be movie_reviews_categories <- function(..., to_r = FALSE){

Like the rest of functions in the R/data.R file.

Then, in the root file named NAMESPACE, you need to remove the export(shuffle) line, to avoid the next error.
I also deleted in my github fork the man/shuffle.Rd file.

It ended up installing a moment ago. I suppose it will work this way. Fingers crossed.

@emmanuel-cefet
Copy link

I did what you suggested to fix but when it comes to that part:

nltk4r::download_datasets("all")

Error: Python module nltk was not found.

Detected Python configuration:

python: C:/Users/pamin/Documents/R-Project/R-4.1.0/env/Scripts/python.exe
libpython: C:/Users/pamin/Documents/R-Project/R-4.1.0/env/python39.dll
pythonhome: C:/Users/pamin/Documents/R-Project/R-4.1.0/env
version: 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Architecture: 64bit
numpy: [NOT FOUND]
nltk: C:\Users\pamin\DOCUME1\R-PROJ1\R-41~1.0\env\lib\site-packages\nltk_init_.p

NOTE: Python version was forced by use_python function

Yours made the same error. If yes, how did you fix it

@xfim
Copy link

xfim commented Jan 20, 2022

Same problem here. Any chance to get this fixed? Thank you.

@Manuellama
Copy link

I tried to fix it today after reading your new comments.
I wrote a R file I used with RStudio today and the tokenizer part seems to work. But I had to write some custom code.
https://github.com/Manuellama/nltk4r/blob/master/sample.R

Please check it to see if it works for you.

@gbfz
Copy link

gbfz commented Mar 25, 2023

@Manuellama Thank you for your fork, it installs correctly.

@teotjunk
Copy link

@Manuellama how do I modify the code if I not using a virtual environment?

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

7 participants