I think the problem may be with it not finding the corpus_root path
that you are specifying. Notice how at the very end of the error
message it says: "IOError: No such file or directory:
'/SeniorSpring2012/CDS490'". Is that the correct and full path to the
directory containing your corpus files? It looks as if there is maybe
missing something in the beginning of the path.
Kristina
On Sun, Apr 8, 2012 at 2:14 PM, Sania <fantas...@gmail.com> wrote:
> ok so now I changed it to...
>
>>>> file_pattern=r".*\.txt"
>>>> reuterarticle=PlaintextCorpusReader(corpus_root, file_pattern)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/nltk/corpus/reader/plaintext.py", line 61, in
> __init__
> CorpusReader.__init__(self, root, fileids, encoding)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/nltk/corpus/reader/api.py", line 82, in
> __init__
> root = FileSystemPathPointer(root)
> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/nltk/data.py", line 155, in __init__
> raise IOError('No such file or directory: %r' % path)
> IOError: No such file or directory: '/SeniorSpring2012/CDS490'
>
> with the ".*\.txt" meaning any character followed by .txt
> but I still get an error :(
>
> Any ideas would be appreciated
>
> Thanks
> Sania
>
> --
> You received this message because you are subscribed to the Google Groups "nltk-users" group.
> To post to this group, send email to nltk-...@googlegroups.com.
> To unsubscribe from this group, send email to nltk-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nltk-users?hl=en.
>