Graph-based word spotting by inexact matching techniques