0

I'm running a python code having this fragment:

logger.info("Done building vocab from corpus.")

return {word: (i, freq) for i, (word, freq) in enumerate(vocab.iteritems())}

I keep getting this message on Linux, although on a Windows machine it runs. I copied the files to the Linux server using WinSCP. I could really use some help.

return {word: (i, freq) for i, (word, freq) in enumerate(vocab.iteritems())}
                          ^

SyntaxError: invalid syntax

My distribution:

Distributor ID: CentOS
Description:    CentOS release 6.6 (Final)
Release:        6.6
Codename:       Final
Will
  • 24,082
  • 14
  • 97
  • 108
user2986978
  • 153
  • 1
  • 5

0 Answers0