Perl 'Expert' Quiz-of-the-Week #9
Mark Jason Dominus <[email protected]> Thu, 19 Dec 2002 17:13:11 -0500
| Newsgroups | gmane.comp.lang.perl.qotw.quiz-of-the-week |
|---|---|
| Organization | Plover Systems |
| Message-ID | <[email protected]> |
IMPORTANT: Please do not post solutions, hints, or other spoilers
until at least 60 hours after the date of this message.
Thanks.
IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
cosa que pueda echar a perder la resolución del problema hasta
que hayan pasado por lo menos 60 horas desde el envío de este
mensaje. Gracias.
IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
date de ce message avant de poster solutions, indices ou autres
révélations. Merci.
WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
Mail. Danke.
BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
eerste 60 uur na het verzendingstijdstip van dit
bericht. Waarvoor dank.
VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
ot daty etogo soobshenija. Spasibo.
Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
Xie4Lou4 Da2An4 De5 Jian4Yi4. Xie4Xie4.
----------------------------------------------------------------
You will write an interactive spelling checker program, named 'yspel'.
The spelling checker will behave just like the 'spel' program
described in the regular quiz of the week, with the following changes:
1 'yspel' will not read the document to be checked from the standard
input; it will use the command-line arguments only. It will edit
these files in-place to correct misspellings as directed by the
user.
2 'yspel' will not produce a list of misspelled words on output.
Instead, for each (possibly) misspelled word it will prompt the user
with the context of the misspelling and a menu of possible
alternative words.
3 If the user selects one of these alternatives, 'yspel' will replace
the mispelled word with the selected alternative.
4 The menu will also include four special options:
1. Replace thee word in the document with an alternative that
wasn't on the menu
2. Add the 'mispelled' word to the user's private dictionary,
in the '.spel' file in their home directory, and ignore all
future appearances of this word in the document
3. Ignore all future appearances of this word in the document,
but don't add the word to the dictionary
4. Ignore this appearance of this word, but continue to flag
it if it appears again in the same document
* * *
P.S.: I'm sorry that this week's quiz (and last week's reports) are
late. I was detained all through Tuesday and Wednesday by other
business. I hope to send out last week's reports tonight.
P.P.S: Yesterday was Perl's 15th birthday. Happy birthday, Perl!
Mark-Jason Dominus [email protected]