Information Technology Topic

Search and Replace and Spell Check

  1. Read notes
  2. Flashcards
  3. Quiz
  4. Confident

Study focus - 3 things

  1. Find locates text and Replace swaps it for new text; the options Match case and Whole words only decide exactly what counts as a match, and Replace All changes every match without stopping to ask
  2. The spelling checker compares each word with a dictionary: unrecognised words get a wavy red line, and you can pick a suggestion, Ignore, Ignore All or Add to Dictionary
  3. A spelling checker only knows whether a word exists, so a wrong but real word (there for their) passes, and names not in the dictionary are flagged even when they are right

Section 1Why search and replace?

In a long document you cannot read every line looking for one word. Find does the looking for you. It jumps to each place where the text you typed appears. Replace goes one step further. It finds the text and swaps it for something else. If a club changes its name, or a teacher spelled a name wrongly twenty times, Replace fixes every one without retyping. Here's the trick: Find is safe because it changes nothing. Replace changes your document, so think before you press it.

Section 2Find and its options

Type the search text and the program highlights a match. Find Next moves to the following one. Find all selects every match at once. Two options control what counts as a match. Match case means the capital and small letters must be exactly as you typed them. Whole words only means the match must be a complete word, not a piece of a longer word. Take this passage: The school bus leaves at 7 a.m. Every Bus must wait at the gate. Buses park near the busy road, and each bus has a number. Searching for bus with no options finds 5 matches: bus, Bus, the start of Buses, the start of busy, and bus. With Match case on, only the 3 small-letter ones count. With Whole words only on, Buses and busy drop out and 3 are left. With both on, only 2 match.

Section 3Replace, one at a time or all at once

The usual steps are: type the search text, type the replacement text, set the options, choose Find Next, then choose Replace for this one or skip it and move on. You see each match before you decide. Replace All swaps every match straight away without stopping for your approval. Suppose a cafe sheet says: Pour the tea. The teacher drinks tea at the teahouse near Kingston. Replace All of tea with juice, with no options, finds 4 matches because tea is hiding inside teacher and teahouse. The result is: Pour the juice. The juicecher drinks juice at the juicehouse near Kingston.

Section 4Safe habits with Replace

Use Whole words only when the search text could sit inside other words. With it on, the tea example changes only the 2 separate words and leaves teacher and teahouse alone. Watch out: a mistaken Replace All may need a manual search to fix, and undo stops working once the file is saved and closed. So run Find first and read the matches, replace one at a time if you are unsure, and keep a copy of the file before a big replace. Easy to mix up: Find all only selects the matches, and it changes nothing. Replace all changes them.

Section 5How the spelling checker works

A spelling checker compares each word in your document with a dictionary. A word it cannot find in the dictionary is treated as a possible mistake. A grammar checker works alongside it. Automatic checking marks unrecognised words as you type, with a wavy red line under the word. In many programs, possible grammar problems are marked with a wavy line of a different colour, such as blue. Right-click a marked word and you are offered suggestions to pick from, Ignore, Ignore All and Add to Dictionary. Pick a suggestion and the word is corrected.

Section 6Running a check and handling names

You can also run a full check on the whole document or on a selected part. When it reaches the end it can restart from the beginning, and you can accept suggestions one at a time or for every instance of the word. A word can be correct but missing from the dictionary, for example a person's name such as Reid or a place such as Mandeville. Choose Add to Dictionary and it is not flagged again. Choose Ignore to skip it this once, or Ignore All to skip every instance of it in the document. The checker only works if the right language dictionary is installed. With the wrong one, many correct words get flagged.

Section 7What a spelling checker cannot do

Because the checker only asks 'is this word in the dictionary?', a real word used in the wrong place passes. In Students must bring there lunch, the word there is a real word, so nothing is flagged even though their was meant. Take this notice: Students must bring thier lunch to Mandeville High on Friday. Mrs Reid will check the list. Studens who forget will recieve a letter. With a dictionary that lacks the two names, 5 words are flagged: thier, Mandeville, Reid, Studens and recieve. After adding Mandeville and Reid to the dictionary, 3 are left, and those 3 really are mistakes. So always read the document yourself as well. Spell check is a helper, not a proofreader.

Examples

A student in Mandeville has this passage: "The school bus leaves at 7 a.m. Every Bus must wait at the gate. Buses park near the busy road, and each bus has a number." She searches for bus. (a) State how many matches are found with no options on. (b) State how many are found with Match case on. (c) State how many are found with Whole words only on. (d) She wants to replace only the separate small-letter word bus with van. State the options she should switch on and write the passage after Replace All.

(a) With no options, the capital letters and the pieces of longer words all count: bus, Bus, Buses, busy and bus. That is 5 matches. (b) Match case leaves only the small-letter bus. These are the word in school bus, the start of busy and the word in each bus. That is 3 matches. (c) Whole words only removes Buses and busy, so the matches are bus, Bus and bus. That is 3 matches. (d) She needs both options on. Match case keeps out Bus, and Whole words only keeps out Buses and busy. Only 2 matches are left, so Replace All changes just those two: The school van leaves at 7 a.m. Every Bus must wait at the gate. Buses park near the busy road, and each van has a number.

A teacher in Mandeville runs the spelling checker on this notice: "Students must bring thier lunch to Mandeville High on Friday. Mrs Reid will check the list. Studens who forget will recieve a letter." Assume the dictionary holds every other word in the notice but not the names Mandeville and Reid. (a) List the words that get a wavy red line and state how many there are. (b) She chooses Add to Dictionary for Mandeville and for Reid. State how many words are flagged now and name them. (c) A helper then changes thier to there by mistake. Will the checker flag it? Explain.

(a) The checker flags any word it cannot find: thier, Mandeville, Reid, Studens and recieve. That is 5 words. Two of them (the names) are correct, and three are real spelling mistakes. (b) Add to Dictionary stores the two names, so they stop being flagged. 5 − 2 = 3 words remain: thier, Studens and recieve. These are the real mistakes, so the teacher corrects them. (c) No. The word there is a real word in the dictionary, so the checker has nothing to flag. The sentence now says Students must bring there lunch, which is wrong because their was meant. Only a person reading the text can catch this, so proofread as well as spell check.

Now let's water it

Session runs notes to flashcards to quiz back-to-back.

Where this comes from