0

for the command

>>> brown.words()

the expected output is

['The', 'Fulton', 'County', 'Grand', 'Jury', ...]

But, when I tried this command I get an output as

[u'The', u'Fulton', u'County', u'Grand', u'Jury', ...]

Anyone knows why this is happening?

I was following these steps

1-installed Python 2.7.10 32-bit version

2-installed NLTK 3.0.5

3-go to Python IDLE

4->>> import nltk

5->>> nltk.download() then downloaded the required data collections

6->>> from nltk.corpus import brown

7->>> brown.words()

Kadiam
  • 303
  • 4
  • 12

1 Answers1

3

The u in front of the string means it is being represented as unicode.

See What does the 'u' symbol mean in front of string values? for a solution

Community
  • 1
  • 1
Chrisrs2292
  • 1,094
  • 1
  • 12
  • 23