Going through a Doc word by word?

32 views
Skip to first unread message

Abela James

unread,
Apr 20, 2020, 8:14:07 PM4/20/20
to Google Apps Script Community
Hi everyone,

I am a complete noob when writing Gscript, so my apologies if this is an obvious question.  I would like to write an extension to go through a doc and check to see if each word is in the 3,000 most common words in English and then put the results in a sidebar.   I've roughly figured out how sidebars work, but what I can't find in the documentation is how to go through a document word by word?  All help very much appreciated.  I think this could be an incredibly useful extension for teachers to encourage people to simplify their documents for EAL learners.

Best wishes
James 


Alan Wells

unread,
Apr 20, 2020, 8:46:43 PM4/20/20
to Google Apps Script Community
Every time I guess at how much work something will be, I am wrong.  It usually takes 5 to 10 times longer than I wanted it to.  This may be more work than you realize, even though the concept is simple.
I did a quick search to see if I could find some existing code to use as a basis to get started.  See the link:

I'm not sure where you are going to get the 3000 word list?  Do you already have that?

Abela James

unread,
Apr 20, 2020, 8:59:43 PM4/20/20
to google-apps-sc...@googlegroups.com
Hi Alan,

Yes, I have that. I agree every time I think about doing Gscripts it seems more work than I think it should be, but I think this is something that would benefit a lot of teachers and a good learning exercise for me.  I will definitely treat it as an experiment, so that I don't get too discouraged.  This snippet seems really helpful! Thank you.

Best wishes
James

P.S. Plan B is to write it in Python, which I already know how to do, but I think this would make it much more accessible to other teachers.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/46f28167-6cdd-410d-9709-96778cd30fc3%40googlegroups.com.


--
Kinds regards,

Mr Abela
Head of Computing


16, Jalan Kiara 3,
Off Bukit Kiara,
50480 Kuala Lumpur, Malaysia.

Tel: +603 6209 6888
Fax: +603 6201 5688
Website: http://www.gardenschool.edu.my

Alan Wells

unread,
Apr 20, 2020, 9:10:16 PM4/20/20
to Google Apps Script Community
Glad to know that you already have programming experience.  I mistakenly assumed otherwise.  One reason that I use Google is because of the GSuite Marketplace.  They have the delivery system.  So, a Docs Add-on under the category of Teaching Tool / Aid (I don't think that's the exact category) should get lots of users.


On Monday, April 20, 2020 at 8:59:43 PM UTC-4, Abela James wrote:
Hi Alan,

Yes, I have that. I agree every time I think about doing Gscripts it seems more work than I think it should be, but I think this is something that would benefit a lot of teachers and a good learning exercise for me.  I will definitely treat it as an experiment, so that I don't get too discouraged.  This snippet seems really helpful! Thank you.

Best wishes
James

P.S. Plan B is to write it in Python, which I already know how to do, but I think this would make it much more accessible to other teachers.

On Tue, 21 Apr 2020 at 08:46, Alan Wells <aj.a...@gmail.com> wrote:
Every time I guess at how much work something will be, I am wrong.  It usually takes 5 to 10 times longer than I wanted it to.  This may be more work than you realize, even though the concept is simple.
I did a quick search to see if I could find some existing code to use as a basis to get started.  See the link:

I'm not sure where you are going to get the 3000 word list?  Do you already have that?


On Monday, April 20, 2020 at 8:14:07 PM UTC-4, Abela James wrote:
Hi everyone,

I am a complete noob when writing Gscript, so my apologies if this is an obvious question.  I would like to write an extension to go through a doc and check to see if each word is in the 3,000 most common words in English and then put the results in a sidebar.   I've roughly figured out how sidebars work, but what I can't find in the documentation is how to go through a document word by word?  All help very much appreciated.  I think this could be an incredibly useful extension for teachers to encourage people to simplify their documents for EAL learners.

Best wishes
James 


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

Phil Bainbridge

unread,
May 5, 2020, 6:54:29 AM5/5/20
to Google Apps Script Community
I have this script which was created to bulk go through Google Docs and access specific text (an answer to a question) that may help you: https://www.pbainbridge.co.uk/2020/05/bulk-extract-text-from-google-docs-for.html

Kind regards
Phil
Reply all
Reply to author
Forward
0 new messages