Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84009 > unrolled thread
| Started by | Jose <josemlv83@gmail.com> |
|---|---|
| First post | 2015-01-19 02:16 -0800 |
| Last post | 2015-01-19 19:40 -0700 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Storing dataset from Condtional FreqDist Jose <josemlv83@gmail.com> - 2015-01-19 02:16 -0800
Re: Storing dataset from Condtional FreqDist Jason Friedman <jsf80238@gmail.com> - 2015-01-19 19:40 -0700
| From | Jose <josemlv83@gmail.com> |
|---|---|
| Date | 2015-01-19 02:16 -0800 |
| Subject | Storing dataset from Condtional FreqDist |
| Message-ID | <bd1c0f0d-febf-482c-a53d-a980d2f091cd@googlegroups.com> |
Hello i have trying to store information in arff file but i has been really. Any ideas of how can i do that?
with open('fileids3.txt', 'r') as f:
genres=[word.strip() for word in f.next().split(',')]
with open('adjectifs2.txt', 'r') as g:
adj = [word.strip() for word in g.next().split(',')]
freq = nltk.ConditionalFreqDist(
(genre, m)
for genre in brown.fileids()
for m in brown.words(fileids=genre))
freq.tabulate(conditions=genres, samples=adj)
[toc] | [next] | [standalone]
| From | Jason Friedman <jsf80238@gmail.com> |
|---|---|
| Date | 2015-01-19 19:40 -0700 |
| Message-ID | <mailman.17878.1421721619.18130.python-list@python.org> |
| In reply to | #84009 |
> Hello i have trying to store information in arff file but i has been really. Any ideas of how can i do that?
>
>
> with open('fileids3.txt', 'r') as f:
>
> genres=[word.strip() for word in f.next().split(',')]
>
> with open('adjectifs2.txt', 'r') as g:
> adj = [word.strip() for word in g.next().split(',')]
>
> freq = nltk.ConditionalFreqDist(
> (genre, m)
> for genre in brown.fileids()
> for m in brown.words(fileids=genre))
>
>
> freq.tabulate(conditions=genres, samples=adj)
What do fileids3.txt and adjectifs2.txt contain (perhaps give us the
first few lines of each)?
What do you want your AARF file to look like (show us what the header
should look like and then the first few lines of data)?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web