English rules of thumb with grep

23 points by piedradura ↗ HN
As a native spanish I was wondering about the words ending in tial or cial, in Spanish they end in cial, for example English tangential => tangencial versus English spacial => espacial

grep to the rescue:

grep -cE "[^aeiou]tial$" british-english => 40

grep -cE "tial$" british-english => 43,

conclusion: with 3 exceptions the rule is (no vowel) + tial

grep -Ec "[aeiou]cial$" british-english => 21

grep -Ec "cial$" british-english => 26, so with 5 exceptions (vowel)+cial.

There must be many low hanging fruit to collect rules of thumb using grep to help you use words correctly. Perhaps someone can give a hint about some of them.

Edit: It seems this rule is well known: https://howtospell.co.uk/cial-and-tial-spelling-rules

4 comments

[ 3.0 ms ] story [ 18.3 ms ] thread
"help you use words correctly" how exactly? This is an interesting bit of etymology, to be sure; but is just one example of a whole library of similar relations. For example, there are entire books devoted to the historical transitions between Germanic languages ('d', 'v') to English ('th', 'f'). That is, you'll see even more impressive numbers with this approach: grep -c -i "^th" british-english
I don't have a German dictionary, my point is that a german person can discover interesting relations between English and German using grep, for example the one you suggest about ('d','v') becoming ('th','f'). The use of gerl is not essential but is a handy tool.
This is cool. We have particular problems with English vs. British spelling for medical terminologies. We have a lookup table for these and other synonyms:

e.g.: "Haemorrhage" vs. "Hemorrhage" etc