nextcloud / text

📑 Collaborative document editing using Markdown
GNU Affero General Public License v3.0
540 stars 87 forks source link

Helping people write better / grading readability #3

Open jancborchardt opened 5 years ago

jancborchardt commented 5 years ago

We could have a mode which helps people write better by rating the readability of their text. This mostly applies if you work on blog posts or essays. I’m imagining something similar to https://hemingwayapp.com, https://www.grammarly.com/, https://quillbot.com/, https://prowritingaid.com/ – etc.

In write mode: hemingway-writemode

In edit mode (as in "being the Editor"): hemingway

juliushaertl commented 5 years ago

Looks interesting, I found https://languagetool.org/ which is open source and support multiple languages, but it is Java based and requires running an additional service http://wiki.languagetool.org/http-server

jancborchardt commented 5 years ago

There’s also these posts on deconstructing and building Hemingway in Javascript (it’s only a very early beginning):

conloos commented 4 years ago

Hi,

I had in the duplicated ticket: #497 noted that it would be good to design the extension so that the "http-api" from languagetool is used by default and if you have your own server, you can overwrite the destination address.

Thanks Frank

juliushaertl commented 4 years ago

I had in the duplicated ticket: #497 noted that it would be good to design the extension so that the "http-api" from languagetool is used by default and if you have your own server, you can overwrite the destination address.

I don't think we should use their public API by default, since this would mean we transfer user data to a 3rd party without consent. It would be fine as an advanced setting I'd say.

jancborchardt commented 4 years ago

Also for reference what word in Microsoft 365 does (more details in the blog post):

Direct link to GIF (too large for GitHub embed): https://techcrunch.com/wp-content/uploads/2020/03/Microsoft-Editor-in-Word.gif

brainchild0 commented 4 years ago

It seems impossible to create an algorithm that satisfies everyone as a means to superior style in some particular natural language. Hemmingway had particular ideas about style that many favor, but he is not objectively better than everyone else who has ever written in English.

It is interesting to consider an extensions interface by which the user can select among various choices of interactive style aids.

I tend to think that exclusive support for a single algorithm will frustrate at least as many users as it will make happy, and I would speculate that some of the most frustrated users will be some of the best writers!

jancborchardt commented 4 years ago

Tool found by @monsieurhannes in duplicate issue https://github.com/nextcloud/text/issues/647 https://github.com/kdzwinel/Proofreader

brainchild0 commented 4 years ago

It seems that Proofreader is not particularly current, but is anyway just a wrapper for write-good, which is maintained actively, adding format support for Markdown or HTML. Since an editor maintains an abstract representation of a document, perhaps the latter project would be of a greater direct use anyway.

mgifford commented 3 years ago

I wanted to pass along this in the thread: https://github.com/wooorm/readability

sereneinserenade commented 2 years ago

Hi, maybe I'm too late to party, but I've made a Tiptap Extension that integrated spellchecking to Tiptap using ProseMirror decorations and Tiptap BubbleMenu.

Here's the Repository: https://github.com/sereneinserenade/tiptap-languagetool Here's a demo: https://tiptap-languagetool.vercel.app/

mgifford commented 2 years ago

That's pretty neat @sereneinserenade but I don't see how it helps with plain language and improved readability.

Better writing, yes. Seems like a nice addition to a basic spell-checker.

max-nextcloud commented 1 year ago

I think the next step here would be more research in terms of tools we could build upon.

brainchild0 commented 1 year ago

It might be interesting to consider a pluggable interface allowing users to choose from an assortment of tools by various providers.

While certain style choices may be considered more standard in certain contexts, I push back against the premise that writing may be objectively graded.

The closest an automated tool might come to helping "write better" would be detecting violations of a very small set of style rules. Again, no single set of guidelines should be imposed on all users. Even professional (human) editors understand that their changes impose their own objectives and ideals upon another's work.

juliushaertl commented 1 year ago

cc @marcelklehr as I remember seeing some pretrained models for analysing text in terms of agressive wording. Maybe you know something that could be interesting here from the AI perspective.

brainchild0 commented 1 year ago

from the AI perspective

Writing isn't chess. The suggestions given by any AI system of a current level of sophistication would severely degrade the style of a talented writer.

mgifford commented 1 year ago

I'm not sure that most people writing content on the web fit the "talented writer" category. I'm also not sure that a really talented writer would be bothered by the suggestions given by AI. After all, we already have grammar check introducing suggestions. Is this making it better or worse? Not sure. AI could also be trained to write in the style of, journalism, a legal document, or Hemingway. No reason why it wouldn't augment a talented writers ability to express themselves in different styles of writing.

brainchild0 commented 1 year ago

Is this making it better or worse? Not sure.

Such is my point. Not everyone is a talented writer, but surely such is a case for a machine making matters worse.

I'm also not sure that a really talented writer would be bothered by the suggestions given by AI.

I think any writing by a talented author cannot be improved by any existing machine. We are not there yet. That is essentially a special case of the Turing test, and a much harder special case than ones that have so far been attempted with limited success.

AI could also be trained to write in the style of, journalism, a legal document, or Hemingway. No reason why it wouldn't augment a talented writers ability

In principle, of course, AI may be considered capable of any feat of the human mind, but from the practical limitations of the present moment, I would challenge the claim that a machine would be able to help improve writing created by someone competent in a given style.

Surely it is possible in principle that a writer might accept a machine's suggestion, and that a reader might approve. As you say, it may make matters better or may make them worse.

I would not encourage anyone to accept a machine's suggestion without actually understanding a sound reason why a human reader might approve of it.

At any rate, returning to the original premise, it is plain to me that there is no consensus within the English-speaking world that Hemmingway's style is the universal measure of superior achievement.

marcelklehr commented 1 year ago

The latest model from google I mentioned yesterday is quite smart in dealing with queries like "is the following sentence readable?" For more detailed things like suggestions and per-word analysis I think we won't find a pre-trained model, as even in commercial tools there's probably a lot of hard coding involved.