trinker / qdap

Quantitative Discourse Analysis Package: Bridging the gap between qualitative data and quantitative analysis
http://cran.us.r-project.org/web/packages/qdap/index.html
175 stars 44 forks source link

R qdap spell check replacing all instances rather than full words #221

Closed christellacaze closed 8 years ago

christellacaze commented 8 years ago

hi there, i posted this issue on stackoverflow and was advised to post it on this github page. hope you can help:

http://stackoverflow.com/questions/38655734/r-qdap-spell-check-replacing-all-instances-rather-than-full-words

thanks,

Christel

trinker commented 8 years ago

Yes. Can you please delete the question on stackoverflow. It was an obvious bug and not appropriate for stackoverflow. Posts like this just make me publicly look inept and there's no chance anyone but the package developer can do something to help you.

trinker commented 8 years ago

Original question:

i have a problem using qdap's interactive spell check. Once i've gone through the interactive spell check and i then want to retrieve the corrected sentences, rather than just correcting the erroneous words, qdap replaces all instances of the required corrections.

Here's an example:

    comments<-c("this is the wrong road", "what have i done ro you")
    (o <- check_spelling_interactive(comments))

    LINE: what have i done <<ro>> you
    SELECT REPLACEMENT: 

    1: TYPE MY OWN   2: IGNORE: ro    3: rob           4: roc           5: rod               6: roe           7: rog        
     8: ron           9: ros          10: rot          11: row          12: roy          13: roz          

    Selection: 1

    Enter Repalcement:

    to

    Spelling Check Complete!

    [1] "this is the wtong toad"  "what have i done to you"

so now all words that contain "ro", eg "roads", get changes to "to", hence changing "roads" to "toads", and "wrong" to "wtong"!!

How can i make sure the changes are only applied to full words rather than all series of characters within words?

And also... why does it misspell "replacement" in "Enter Repalcement"?

i'm using R 3.2.3 in RStudio on a PC and qdap 2.2.4.

thanks for your help.

christellacaze commented 8 years ago

hi Tyler,

thank you for fixing this - i have now deleted my post on stackoverflow as requested.

My apologies - i never intended to make you look "inept", i didn't realise it was a bug, i just thought that maybe i was using the function incorrectly ie by not specifying some option.

Thank you for your help and for providing great packages!

Christel


From: Tyler Rinker notifications@github.com Sent: 02 August 2016 17:24 To: trinker/qdap Cc: chrisjacques; Author Subject: Re: [trinker/qdap] R qdap spell check replacing all instances rather than full words (#221)

Closed #221https://github.com/trinker/qdap/issues/221.

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/trinker/qdap/issues/221#event-742725687, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFovI0G6qbpgd3XgSXlAeinNfduKrilXks5qb31fgaJpZM4JYNUf.

trinker commented 8 years ago

Thanks for the feedback. I get it. There have been times I ask on SO too because I assume I'm doing something wrong. For typos in spelling I'd appreciate it kindly if you'd please report them here or do a pull request and make the fix (what ever you're most comfortable with).