This is a function built off this Python answer on Stack Overflow. It allows some flexibility in that the lists of prefixes, suffixes, etc. can be modified to depending on the specific target text. It's definitely not perfect, but could be useful.
Used to answer this SO question