clips/pattern — pull request #59 by markus-beuckelmann (2013-12-06 13:43:33+00:00)
Title: Check length to prevent IndexErrors

I always got an IndexError for certain input. Just using b[-3] is not safe. Even if b.endswith('er') is true, b could still be less that three chars long (<=> b = 'er'). Example: "erst" raises an IndexError. It's not a noun of course, but still should not raise an IndexError.