Homonyms
Definition: a homonym is a word with the same pronounciation as another but with a different meaning, origin, and, usually, spelling.
Purpose: to illustrate how C4.5 and C4.5rules can be used to automate a more difficult task.
Problem: using three collected sets of instances containing homonyms, learn rules to determine, given a window of the five previous words (classified according to their respective Part Of Speech), which spelling of each homonym is preferred.
Downloadable Files
Homonym Pair | filestem.names | filestem.data | Decision Tree | Decision Rules |
"Bare" versus "Bear" | bare.names | bare.data | text or gif | text or gif |
"Baron" versus "Barren" | baron.names | baron.data | text or gif | text or gif |
"In" versus "Inn" | in.names | in.data | text or gif | text or gif |
"Wait" versus "Weight" | wait.names | wait.data | text or gif | text or gif |
Summary of Results
Comment: only the immediately preceeding word/part of speech contributes to these rules.
"Bare" versus "Bear"
- Rule 1: if the word before the homonym is a verb, then use the spelling "bare".
e.g., "He was bare." - Rule 2: if the word before the homonym is an adverb, then use the spelling "bare".
e.g., "He was very bare." - Rule 3: if the word before the homonym word is modal (e.g., will, shall), then use the spelling "bear".
e.g., "They shall bear gifts." - Otherwise, by default, spell the homonym as "bear".
"Baron" versus "Barren"
- Rule 1: if the word before the homonym is a verb, then use the spelling "barren".
e.g., "Deserts are barren biomes." - Rule 2: if the word before the homonym is an article, then use the spelling "baron".
e.g., "He is a baron." - Otherwise, by default, spell the homonym as "barren".
"In" versus "Inn"
- Rule 1: if the word before the homonym is a verb, then use the spelling "in".
e.g., "She walked in." - Rule 2: if the word before the homonym is an article, then use the spelling "inn".
e.g., "They stayed at an inn." - Otherwise, by default, spell the homonym as "in".
"Wait" versus "Weight"
- Rule 1: if the word before the homonym is a possessive pronoun, then use the spelling "weight".
e.g., "Her weight." - Rule 2: if the word before the homonym is a pronoun, then use the spelling "wait".
e.g., "I wait." - Otherwise, by default, spell the homonym as "wait".