Giter Club home page Giter Club logo

fuzzywuzzyr's Introduction

Hey there!

My name is Lampros and I'm a self-taught Programmer and Data Scientist.

  • I work on a daily basis with the R programming Language
  • I utilize Python for my deep learning tasks
  • I use C++ (via Rcpp, RcppArmadillo, Cython and Pybind) to improve the efficiency of my R and Python code

The following stats show my contribution to the open source community,


Lampros's GitHub Stats



📫 You can reach me best via e-mail to [email protected]

If you like my work, you can support it using one of:


fuzzywuzzyr's People

Contributors

mlampros avatar monopteryx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fuzzywuzzyr's Issues

fuzzywuzzyR: "attempt to apply non-function" error for all the functions under FuzzMatcher, FuzzExtract and FuzzUtils classes

I'm running R version 3.3.2 (64-bit), python version 2.7.12 (32-bit) on Windows 8.1 (64-bit). I have installed fuzzywuzzyR as well as corresponding python packages: fuzzywuzzy, Levenshtein

I tried the following:

s1 = ' It was a dark and stormy night. I was all alone sitting on a red chair.'
s2 = ' It was a murky and stormy night. I was all alone sitting on a crimson chair.'
init <- FuzzMatcher$new()
init$Partial_ratio(string1 = s1, string2 = s2)

I received the following error message upon running the last statement:
"Error in init$Ratio(string1 = s1, string2 = s2) :
attempt to apply non-function"

I also observed the following:

check_availability()
[1] FALSE

Is there a fix for this problem? All the online articles showed positive result while testing the functions of FuzzMatcher class.

How to deal with Chinese characters?

library(fuzzywuzzyR)
word = "安广"
choices = c("安徽","安广")
init_proc = FuzzUtils$new()      # initialization of FuzzUtils class to choose a processor
PROC = init_proc$Full_process    # processor-method
init_scor = FuzzMatcher$new()    # initialization of the scorer class
SCOR = init_scor$WRATIO          # choosen scorer function
init <- FuzzExtract$new()        # Initialization of the FuzzExtract class
init$Extract(string = word, sequence_strings = choices, scorer = SCOR)

When I use the above code, I find that the result are all 0. Is that means that this package cannot work properly when dealing with Chinese characters?

Attempt to apply non-function

The package used to work well (just 3 months ago in fact), but recently, when I use parts of it, I'm getting this error:

Error in DIFFLIB$get_close_matches(string, sequence_strings, n, cutoff) :
attempt to apply non-function

I do have python installed, as well as all the other dependencies, and it worked 3 months ago (I had no issues then).

Here's my output for reticulate::py_discover_config(required_module = 'fuzzywuzzy') in case that helps:

python: C:\Users\username\AppData\Local\Programs\Python\Python36\python.exe
libpython: C:/Users/username/AppData/Local/Programs/Python/Python36/python36.dll
pythonhome: C:\Users\username\AppData\Local\Programs\Python\Python36
version: 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]
Architecture: 64bit
numpy: C:\Users\username\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy
numpy_version: 1.14.5
fuzzywuzzy: C:\Users\username\AppData\Local\Programs\Python\Python36\lib\site-packages\fuzzywuzzy_init_.p

python versions found:
C:\Users\username\AppData\Local\Programs\Python\Python36\python.exe
C:\Users\username\AppData\Local\Programs\Python\Python36\python.exe

What might be happening? Thanks!

Error in init$WRATIO: attempt to apply non-function: Rshiny deployment

Dear Developer,

I'm trying to develop an app where it computes inti$WRATIO(string1, string2). If I execute the same code in "global.R" it generates the output & also If I deploy it locally.

However, If I deploy the same app on Shinyappsio, deployment is successful with an error message on the web-page as "An error has occurred. Check your logs or contact the app author for clarification.". When I check the logs,

2019-03-06T15:38:16.440428+00:00 shinyapps[769913]: Server version: 1.7.0-11 2019-03-06T15:38:16.440430+00:00 shinyapps[769913]: LANG: en_IN.UTF-8 2019-03-06T15:38:16.440460+00:00 shinyapps[769913]: R version: 3.5.2 2019-03-06T15:38:16.440461+00:00 shinyapps[769913]: shiny version: 1.2.0 2019-03-06T15:38:16.440462+00:00 shinyapps[769913]: httpuv version: 1.4.5.1 2019-03-06T15:38:16.440463+00:00 shinyapps[769913]: rmarkdown version: NA 2019-03-06T15:38:16.440464+00:00 shinyapps[769913]: knitr version: NA 2019-03-06T15:38:16.440478+00:00 shinyapps[769913]: jsonlite version: 1.6 2019-03-06T15:38:16.440479+00:00 shinyapps[769913]: RJSONIO version: NA 2019-03-06T15:38:16.440620+00:00 shinyapps[769913]: Using pandoc at /opt/connect/ext/pandoc2 2019-03-06T15:38:16.593666+00:00 shinyapps[769913]: Using jsonlite for JSON processing 2019-03-06T15:38:16.599102+00:00 shinyapps[769913]: 2019-03-06T15:38:16.440487+00:00 shinyapps[769913]: htmltools version: 0.3.6 2019-03-06T15:38:16.599103+00:00 shinyapps[769913]: Starting R with process ID: '17' 2019-03-06T15:38:17.795024+00:00 shinyapps[769913]: 2019-03-06T15:38:17.795028+00:00 shinyapps[769913]: Listening on http://127.0.0.1:45213 2019-03-06T15:38:29.874301+00:00 shinyapps[769913]: Warning: **Error in init$WRATIO: attempt to apply non-function** 2019-03-06T15:38:29.889793+00:00 shinyapps[769913]: 110: init$WRATIO 2019-03-06T15:38:29.889796+00:00 shinyapps[769913]: 108: renderDataTable [/srv/connect/apps/Fuzzy_Logic/server.R#29] 2019-03-06T15:38:29.889797+00:00 shinyapps[769913]: 107: func 2019-03-06T15:38:29.889798+00:00 shinyapps[769913]: 94: origRenderFunc 2019-03-06T15:38:29.889800+00:00 shinyapps[769913]: 13: runApp 2019-03-06T15:38:29.889801+00:00 shinyapps[769913]: 7: connect$retry 2019-03-06T15:38:29.889799+00:00 shinyapps[769913]: 93: output$dataOutput 2019-03-06T15:38:29.889801+00:00 shinyapps[769913]: 12: fn 2019-03-06T15:38:29.889802+00:00 shinyapps[769913]: 6: eval 2019-03-06T15:38:29.889803+00:00 shinyapps[769913]: 5: eval

Also please find the screenshot of the app after successful deployment,
screenshot from 2019-03-06 21-19-39

When I execute locally output is fine as below screenshot,
screenshot from 2019-03-06 21-22-07

Kind help is greatly appreciated!!!

Thanks
Yashwanth

Error in init$Extract(string = word, sequence_strings = choices, processor = PROC, : attempt to apply non-function

Hi,

if I try to run your example, the code is below, I get the following error:
"Error in init$Extract(string = word, sequence_strings = choices, processor = PROC, :
attempt to apply non-function"

I tried with both package versions, the one in Cran and in Github.

This is the code which generates that error:

library(fuzzywuzzyR)
word = "new york jets"

choices = c("Atlanta Falcons", "New York Jets", "New York Giants", "Dallas Cowboys")

processor :

init_proc = FuzzUtils$new() # initialization of FuzzUtils class to choose a processor

PROC = init_proc$Full_process # processor-method

PROC1 = tolower # base R function ( as an example for a processor )

scorer :

init_scor = FuzzMatcher$new() # initialization of the scorer class

SCOR = init_scor$WRATIO # choosen scorer function

init <- FuzzExtract$new()

Initialization of the FuzzExtract class

init$Extract(string = word, sequence_strings = choices, processor = PROC, scorer = SCOR)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.