Modeling lexical effects on phonetic categorization and semantic effects on word recognition