How to reset Mac OS X text substitution?

Try running these commands:

defaults delete -g NSUserReplacementItems
defaults delete -g NSUserDictionaryReplacementItems

Then quit and reopen some application and test if it worked.

NSUserDictionaryReplacementItems is used in 10.9 and NSUserReplacementItems is used in 10.8 and earlier.