Your reply message has not been sent.
Your post was successful
From: peter ljunglöf <peter.ljung...@heatherleaf.se>
Date: Mon, 3 Sep 2012 09:23:10 +0200
Local: Mon, Sep 3 2012 3:23 am
Subject: Re: [nltk-users] The Method of Insert doesn't work. AttributeError: 'ConcatenatedCorpusView' object has no attribute 'insert'
3 sep 2012 kl. 04:44 skrev John H. Li:
> Isn't text in NLTK corpus in a list format already? I am puzzled. I tested the text from nltk as follows. It is a list actually. See the following:You did just implicitly convert it to a list:
> >>> text = nltk.corpus.brown.words(categories = 'news')
> >>> text[:10]
> ['The', 'Fulton', 'County', 'Grand', 'Jury', 'said', 'Friday', 'an', 'investigation', 'of']
>>> type(text)<class 'nltk.corpus.reader.util.ConcatenatedCorpusView'>
>>> type(text[:10])<type 'list'>
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.