Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion The Method of Insert doesn't work. AttributeError: 'ConcatenatedCorpusView' object has no attribute 'insert'
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
peter ljunglöf  
View profile  
 More options Sep 3 2012, 3:23 am
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:
> >>> text = nltk.corpus.brown.words(categories = 'news')
> >>> text[:10]
> ['The', 'Fulton', 'County', 'Grand', 'Jury', 'said', 'Friday', 'an', 'investigation', 'of']

You did just implicitly convert it to a list:

>>> type(text)

<class 'nltk.corpus.reader.util.ConcatenatedCorpusView'>

>>> type(text[:10])

<type 'list'>

/Peter


 
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.