Primitive text direction feature detector

v.1.1 of text direction feature detector :)
return cmp(b['derivative'], a['derivative'])