In mathematical expressions and equations, variables are used to represent unknown or changeable quantities. They act as placeholders for undetermined or unspecified values. Different unknowns are given different names.
Therefore, AutoMathic creates variables out of nouns and noun phrases.
As AutoMathic reads its input, it identifies noun phrases and automatically selects variables to stand for them. Identifying noun phrases involves seeing what remains when numbers, operators, and other function words have been identified and processed.
Noun Phrase | Result |
cars that are red
|
red |
scores which would be counted
|
counted |
students who were absent
|
absent |
For readability, AutoMathic tries to select variables that are good mnemonics for their noun phrases. It uses the following strategy to try to select an unused variable for a noun phrase:
Before AutoMathic tries to select a new variable for a noun phrase, it must first determine if the noun phrase is actually referring to something new. In informal language, the "same thing" can be referred to with different words or phrases. The same variable should be used regardless of slight differences in wording, so it is important that AutoMathic recognize when different but similar noun phrases are really referring to the same thing. It uses a few strategies to see if different noun phrases might refer to the same thing:
Singular | Plural |
car | cars |
loss | losses |
church | churches |
ash | ashes |
box | boxes |
company | companies |
Words with alternate or often-misspelled plural forms (e.g. potato, potatoes, "potatos") are usually recognized and matched using fuzzy matching.
AutoMathic's fuzzy-matching technique compares the noun phrase to previous noun phrases and scores their similarity on a scale of 0% - 100%. Identical phrases score 100%, and phrases with no letters in common score 0%. Any differences are reflected with a score somewhere in-between.
Predefined (but customizable) thresholds determine how a score is interpreted:
Irregular plurals (e.g. woman and women), minor misspellings, and minor typographical errors are usually similar enough to trigger some kind of a fuzzy match.
If different references to the same thing slip by and are not matched, AutoMathic can be explicitly told that they are the same with a statement of fact (e.g. "goose means geese"). This requires that the user pay close attention to AutoMathic's messages regarding variable creation.