Ruby style suggestions, ymmv
- use '-' to remove nouns from words array instead of 'each' + 'include?'
- use 'scan' instead of 'gsub' + 'split'
- for concision: inlined 'pattern' and 'replacement' instead of setting a local reference
- single quotes for replacement, less escaping