Jump to content

check text with Grammarly or google


Recommended Posts

Hi I would really like a workflow that helped me preform spellcheck. 

Something like selecting a text and pressing a hotkey the text is copied and sent to someware and checked 

I have Grammarly desktop app perhaps the text could to copied and automatically pasted into that? 

or perhaps it could be done on line? 

 

I don't know a lot about Alfred and the options in this case - I could imaging that something like it is already on the forum - but I couldn't find it. 

 

Thanks for helping  

Link to comment
  • 2 years later...
On 2/13/2020 at 9:17 PM, flight505 said:

Hi I would really like a workflow that helped me preform spellcheck. 

Something like selecting a text and pressing a hotkey the text is copied and sent to someware and checked 

I have Grammarly desktop app perhaps the text could to copied and automatically pasted into that? 

or perhaps it could be done on line? 

 

I don't know a lot about Alfred and the options in this case - I could imaging that something like it is already on the forum - but I couldn't find it. 

 

Thanks for helping  

Is there any solution to it? It would be great to have a workflow that can spellcheck and suggest sentence corrections. Even Grammarly desktop is difficult to use as there is no accept all features and it keeps basic things that can be auto-corrected (like double space replaced with a single, sentence starting with Capital). It will be great if you can share workflow and other tools that can help in document editing and updating. I convert video / meeting to the transcript for reading through this fast and hoping to have a tool that does regular corrections automatically. Open to AppleScript and related Alfred workflow to achieve this.

Link to comment

One basic way to carry out a spellcheck (assuming you have set spellcheck appropriately under System Preferences > Keyboard > Text) is with a workflow that starts with a Universal Action acting only on Text, connect that to a Launch Apps action to launch TextEdit and in turn link to a Copy to Clipboard action, checking Automatically paste to frontmost app and Mark item as transient in clipboard (on the assumption you don't want the text to hang around in the clipboard). TextEdit should then automatically highlight words which it thinks are spelled incorrectly.Of course, that does leave you to close TextEdit (and, presumably, choose to delete) when done.

 

It's a pretty basic workflow but does at least part of what you want. It works for me and I could upload it on Github if there's any demand but it's easy enough to create.

 

Stephen

Link to comment
4 hours ago, Stephen_C said:

One basic way to carry out a spellcheck (assuming you have set spellcheck appropriately under System Preferences > Keyboard > Text) is with a workflow that starts with a Universal Action acting only on Text, connect that to a Launch Apps action to launch TextEdit and in turn link to a Copy to Clipboard action, checking Automatically paste to frontmost app and Mark item as transient in clipboard (on the assumption you don't want the text to hang around in the clipboard). TextEdit should then automatically highlight words which it thinks are spelled incorrectly.Of course, that does leave you to close TextEdit (and, presumably, choose to delete) when done.

 

It's a pretty basic workflow but does at least part of what you want. It works for me and I could upload it on Github if there's any demand but it's easy enough to create.

 

Stephen

Thanks Stephen. You can upload and share the link.

 

it will be great to do more such as configure some rules and apply them to the text. Find and replace all ‘Yeah’ or auto capitalise first character in a sentence. I would like to hear more feedback on grammarly, pro writing or word tune and if any of these have AppleScript support and can be integrated with Alfred. There is one summariser services in Automator that I intend to try.

Link to comment
  • 1 month later...
On 8/29/2022 at 10:16 PM, TomBenz said:

Thanks Stephen. You can upload and share the link.

 

it will be great to do more such as configure some rules and apply them to the text. Find and replace all ‘Yeah’ or auto capitalise first character in a sentence. I would like to hear more feedback on grammarly, pro writing or word tune and if any of these have AppleScript support and can be integrated with Alfred. There is one summariser services in Automator that I intend to try.

 

I have addressed few of ideas above with Applescript. Posting it in case it is useful to others.

 

1. This code removes filler words from text such as Transcripts:

 

set xFind to {"seriously", "Well", "Um", "er", "uh", "Hmm", "like", "actually", "basically", "you see", "you know", "I mean", "I guess", "OK", "Umm.", "Umm"}

set xReplace to ""

set i to 0

tell application "Microsoft Word"

tell active document

--set xword to first item in list xFind

set numberOfSections to number of sections

log ("••••• There are " & numberOfSections & " in this document.")

repeat with curSectionNum from 1 to numberOfSections

repeat with xword in xFind

log ("••••• Section: " & curSectionNum & " - Begin search and replace")

tell section curSectionNum

((execute find (find object of (text object)) ¬

find text xword replace with xReplace replace replace all with match whole word and case match fuzzy) is true)

repeat with whichHeaderFooter in {header footer primary, header footer first page, header footer even pages}

execute find (find object of (text object of (get header index whichHeaderFooter))) ¬

find text xword replace with xReplace replace replace all

execute find (find object of (text object of (get footer index whichHeaderFooter))) ¬

find text xword replace with xReplace replace replace all

end repeat

end tell

end repeat

end repeat

end tell

end tell

 

2. This code applies some punctuation rules and can be extended. 

 

 

-- Apply Punctuation rules

 

my find_replace(", ,", ",") -- replace double comma with comma

my find_replace(",,", ",")

my find_replace(". .", ".") -- replace double dots with one dot

my find_replace("..", ".")

my find_replace(",?", "?")

my find_replace(", ?", "?") -- retain question mark

my find_replace(" ,", ",") -- remove extra space before comman

my find_replace("  ", " ") -- replace double space with single space

my find_replace(":  ", ":")

 

on find_replace(xFind, xReplace)

tell application "Microsoft Word"

tell active document

set numberOfSections to number of sections

log ("••••• There are " & numberOfSections & " in this document.")

repeat with curSectionNum from 1 to numberOfSections

log ("••••• Section: " & curSectionNum & " - Begin search and replace")

tell section curSectionNum

execute find (find object of (text object)) ¬

find text xFind replace with xReplace replace replace all with match whole word

repeat with whichHeaderFooter in {header footer primary, header footer first page, header footer even pages}

execute find (find object of (text object of (get header index whichHeaderFooter))) ¬

find text xFind replace with xReplace replace replace all

execute find (find object of (text object of (get footer index whichHeaderFooter))) ¬

find text xFind replace with xReplace replace replace all

end repeat

end tell

end repeat

end tell

end tell

end find_replace

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...