Word Spotting and Recognition with Embedded Attributes