Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write-good output #8

Closed
jasdumas opened this issue May 26, 2017 · 3 comments
Closed

write-good output #8

jasdumas opened this issue May 26, 2017 · 3 comments

Comments

@jasdumas
Copy link
Owner

jasdumas commented May 26, 2017

A future development task and discussion could be to synthesize the output for readability or in a tidy format so that the changes can be implemented programmatically. The API currently displays the index position along with the reason for output. The CLI displays an output similar to how word processing spell checkers communicate suggestions for editing with the underline.

> jasminedumas~/Desktop/GitHub Clone Repos/gramr: write-good --text="It should have been defined there."
In text
=============
It should have been defined there.
               ^^^^^^^^^^^^
"been defined" may be passive voice on line 1 at column 15

For example in a tidy format:

position original_sentence reason
line 1 at column 15 It should have been defined there. "been defined" may be passive voice
@benmarwick
Copy link
Contributor

Great idea, I think we can use knitr::kable to help with the tidying. Getting the original text snippet to include in the output might be a bit fiddly, let's try it!

@benmarwick
Copy link
Contributor

benmarwick commented May 27, 2017

Now #10 will produce output like this

| index| offset|reason                              |
|-----:|------:|:-----------------------------------|
|    15|     12|"been defined" may be passive voice |
|    49|      8|"suddenly" can weaken meaning       |

for this text: "It should have been defined there. But it wasn't suddenly."

But I'm not sure what 'index' and 'offset' are about, and how they refer to the original text. Any thoughts?

@jasdumas
Copy link
Owner Author

I really like the new output! I thought the index was the column position and the offset was maybe the word length but its not making sense - I may file a issue on the write-good repo and ask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants