Sunday, July 8, 2018

Text to table: Making a vocabulary chart from text in Google Docs or Microsoft Word

SPOILER ALERT: This is slightly easier in Word.

Let's say you want to create a vocabulary chart in Chumash for students to fill in the שורש, as well as prefix(es) / suffix(es) and translation. (This works in any language; I'm using Hebrew because it's what I teach.)

PART ONE: GOOGLE DOCS

If you stay in Google Docs, the only way to do it is create a table, and drag each word into one of the cells. Which is doable, but it's a slog.

However, by using Google Sheets, we can in effect convert text to a table.
Begin by copying the פסוק from any online site with text (like Sefaria) and paste it into the first cell of a Google Sheet.

Image from Gyazo

However, this leaves all the words crunched up in one cell. Not useful.

Click the little "clipboard" icon that pops up next to the cell (or if you miss it, go to Data | Split Text to Columns), and choose Separator: Space. This will put each word in the verse in a separate cell in the same row. Still not what we want, but one step closer.

Image from Gyazo


Highlight all the words in the row and copy (either Ctrl+C or Edit | Copy)

Image from Gyazo


Now RIGHT-click in the first cell of the 2nd row (2A) and select Paste Special | Paste transposed. This will now paste all of the words in the first column, which is what we need.


Image from Gyazo


Now just highlight and copy the column (ignoring the first row).


Image from Gyazo

Now you can go to Google Docs and paste this table into a new doc. You can choose Paste unlinked.



Right click and add as many columns (to the left, if you're doing Hebrew) as you need.



PART TWO: MICROSOFT WORD

As promised, word makes it slightly easier.

Paste your verse / sentence etc. into Word

Highlight it, and go to Insert and click on the arrow at the bottom of the Table icon, and choose Convert Text to Table.


The default will be the number of words as columns. You want to reverse that, and change the number in the Columns box to 1; the number of rows will change automatically to the number of words.


Where is says Separate text at: choose Other and hit the SPACE BAR once. Then hit OK.
This will place all your words in a single column, one word per cell. From here you can add columns, delete rows for words you don't want to feature, etc.