Giter VIP home page Giter VIP logo

fasttextr'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:


fasttextr'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

Watchers

 avatar  avatar

fasttextr's Issues

Error: 'skipgram_cbow' is not an exported object from 'namespace:fastTextR'

Hi -
I'm following this tutorial ( https://cran.r-project.org/web/packages/textTinyR/vignettes/word_vectors_doc2vec.html
)

ERROR:

Error in skipgram_cbow(input_path = PATH_INPUT, output_path = PATH_OUT,  : 
  could not find function "skipgram_cbow"

Running into an error when running the following code:

`vecs` = fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path = PATH_OUT, 
                                 method = "skipgram", lr = 0.075, lrUpdateRate = 100, 
                                 dim = 300, ws = 5, epoch = 5, minCount = 1, neg = 5, 
                                 wordNgrams = 2, loss = "ns", bucket = 2e+06,
                                minn = 0, maxn = 0, thread = 6, t = 1e-04, verbose = `2)`

Thank you for your help!

skipgram_cbow throws an error

Hi. I am trying to use skipgram_cbow command. And I am using Windows.
So, I installed fastTextR using devtook, but "fastTextR::skipgram_cbow(input_path = ...)" didn't work.

`> devtools::install_github('mlampros/fastTextR')

vecs = fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path = PATH_OUT,

  •                             method = "skipgram", lr = 0.075, lrUpdateRate = 100, 
    
  •                             dim = 300, ws = 5, epoch = 5, minCount = 1, neg = 5, 
    
  •                             wordNgrams = 2, loss = "ns", bucket = 2e+06,
    
  •                             minn = 0, maxn = 0, thread = 6, t = 1e-04, verbose = 2)
    

Error: 'skipgram_cbow' is not an exported object from 'namespace:fastTextR'`

So, I tried the following command, but got an error message when executing the fourth line:

`setwd('/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('/your_folder/')
system("R CMD build fastTextR")

  • checking for file 'fastTextR/DESCRIPTION' ... OK
  • preparing 'fastTextR':
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'fastTextR_1.0.1.tar.gz'
    Warning in gzfile(tarfile, "wb", compression = compression_level) :
    cannot open compressed file 'C:/Program Files/R/R-3.5.1/library/fastTextR_1.0.1.tar.gz', probable reason 'Permission denied'
    Error in gzfile(tarfile, "wb", compression = compression_level) :
    cannot open the connection
    Execution halted

system("R CMD INSTALL fastTextR_1.0.0.tar.gz")`

"Permission denied" may mean that the command failed to make changes to the fastTextR folder since it is read-only. However, I tried to unlock the read-only option of the folder, it never gets unlocked. Or maybe I am pointing to a wrong issue. How do I get around with this error message?
Is there any other way to install fastTextR in Windows?

Thank you!

Args to pointers issue

Error in .Call("fastTextR_convert_args_to_pointers", PACKAGE = "fastTextR", :
"fastTextR_convert_args_to_pointers" not available for .Call() for package "fastTextR"

I compiled the package from the repo. But for some reason I get this error when I try to use the package. Any idea how to solve this?

Predict Document Similarity

Hi @mlampros,

Is there a way to use FastTextR to predict the top N number of similar documents? I've gone through the algorithm and can compile the doc2sum with k means (per your example), but having trouble being able to get top 5 most related to a single document.

Thanks for your help.

Access to loss values while or after training

Hi. I am following the example presented below:
https://cran.r-project.org/web/packages/textTinyR/vignettes/word_vectors_doc2vec.html

At the stage of using fasttextR command as below:
vecs = fastTextR::skipgram_cbow(input_path = PATH_INPUT, output_path = PATH_OUT,
method = "skipgram", lr = 0.075, lrUpdateRate = 100,
dim = 400, ws = 5, epoch = 10, minCount = 1, neg = 5,
wordNgrams = 2, loss = "ns", bucket = 2e+06,
minn = 0, maxn = 0, thread = 6, t = 1e-04, verbose = 2)

While this code above is being executed, R presents loss values for each epoch.
However, after the execution is over, those verbose containing loss values are gone.
Is there any way for me to access the values of loss for each epoch?
I am trying to capture these loss values in order to decide the optimal size of the epoch by figuring out starting from which epoch the loss flattens out.

Additionally, is it possible to compute the loss value after training a model with a specific epoch size?

Looking forward to hearing from you soon. Thank you!

PRoblem

Hi,

I want to install the Fasttext package from computer of my company. Due to the company's firewall, I have to manually install this way:

setwd('C:/your_folder/fastTextR/')
Rcpp::compileAttributes(verbose = TRUE)
setwd('C:/your_folder/')
system("R CMD build fastTextR")
system("R CMD INSTALL fastTextR_1.0.2.tar.gz")

Even through I tried to install Rtools but it still does not work:

============================================================

Configuration CCC :

Proxy :
    HTTP  = pxy-http-srv:1234
    HTTPS = pxy-http-srv:1234

Serveur de paquets (le seul accessible via le proxy) :
    https://mirror.ibcp.fr/pub/CRAN/

Librairie locale de paquets : 
    C:\Developpement\R_Packages\

Fichiers de config pris en compte :
    C:/PROGRA~1/R/R-35~1.0\Renviron.site
    C:/PROGRA~1/R/R-35~1.0\Rprofile.site

Error in library("colorout") :
no package named 'colorout' is found
Stopped execution
In R CMD INSTALL

Could someone please tell me how can I solve this problem?

Thanks a lot for your information!

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.