Updated framework with treating text as single word