gramr icon indicating copy to clipboard operation
gramr copied to clipboard

grammar check on a block of strings instead of .R and .Rmd files only

Open ghost opened this issue 6 years ago • 2 comments

Hi thank you so much for this package 👍

I was wondering if we can do a grammar check on a block of strings, like an essay-type, instead of a .R or .Rmd file

ghost avatar Dec 02 '18 22:12 ghost

I similarly was curious as to this application. Since I recently discovered that r has a textreadr package which can import a load of docx and pdf files and read in their texts I realized that, since my students (I'm a professor) upload reports to a dropbox linked on my local drive, I can merely pull the list of files and import them into a structured list of string vectors. Binding these string vectors together would allow me to run a grammar, spelling and flesch-kincaid test on their papers all at once and recast output to structured RMD files. Basically I can take their reports and grade them, as I like to call it 'automagically'. I do similar applications with RExams and Excel so this would seal the deal. I forked the package to take a look at using the npm for write-good and extend it to the text level.

Karnner2 avatar Dec 12 '19 04:12 Karnner2

And now I realize why Dumas hasn't replied to this request for you Yeshna. After looking at the source it appears both of us should read before requesting. (Sorry Dumas!) There is already a sub-function created in the write_good_ip which implements the write-good npm, it's:

check_grammar("So the cat was stolen.", list(passive=FALSE))`

if you install the gramr package as the instructions stipulate you can simply run check_grammar on whatever text you choose. Applying this to a set of strings ( lapply, etc.) can be done easily. As a result--this has already been done.

Karnner2 avatar Dec 12 '19 04:12 Karnner2