bnosac / textrank

Summarise text by finding relevant sentences and keywords using the Textrank algorithm
77 stars 9 forks source link

add parallel processing with the ```future.apply``` #8

Closed seonghobae closed 4 years ago

seonghobae commented 4 years ago

Hello there!

I added a parallel processing feature with the future.apply library.

This patch is harmless to everyone, and make a foundation of who want to use this textrank library in the high-performance computing environment. Please checkout my request, and I hope my commitment will be accepted.

Best, Seongho

seonghobae commented 4 years ago

I already added to import in the namespace and description file; however, are you meant to move into the 'suggest' not in 'import'?

jwijffels commented 4 years ago

Yes

seonghobae commented 4 years ago

Okay, I'm modifying that now!

seonghobae commented 4 years ago

I made a push into the GitHub!

seonghobae commented 4 years ago

Okay, If I replace that, R warns like this in code testing procedures; however, I'm making a fix right now if you never minded.

N  checking R code for possible problems (5.4s)
   textrank_candidates_all: no visible global function definition for
     ‘installed.packages’
   textrank_candidates_lsh: no visible global function definition for
     ‘installed.packages’
   textrank_keywords: no visible global function definition for
     ‘installed.packages’
   textrank_sentences: no visible global function definition for
     ‘installed.packages’
   Undefined global functions or variables:
     installed.packages
   Consider adding
     importFrom("utils", "installed.packages")
   to your NAMESPACE file.
seonghobae commented 4 years ago

Okay, all issues solved.

jwijffels commented 4 years ago

I meant as in https://github.com/bnosac/udpipe/blob/9ef8434a6394538ddbd298df0922cb4f9a03399a/R/topicmodels.R#L71

jwijffels commented 4 years ago

I meant as in https://github.com/bnosac/udpipe/blob/9ef8434a6394538ddbd298df0922cb4f9a03399a/R/topicmodels.R#L71 like if(requireNamespace("future.apply"))

seonghobae commented 4 years ago

Sorry, I miss understood what you said. I make a fix now.