Getting word frequencies from files which are in folder.

krisbee1983 at gmail.com krisbee1983 at gmail.com
Wed Apr 4 16:07:26 EDT 2007


> This sounds suspiciously like a homework assignment.
> I don't think you'll get much help for this one, unless
> you show some code you wrote yourself already with a specific
> question about problems you're having....

Well you have some right. I will make it more specific.
I have got something like that:

import os, os.path

def wyswietlanie_drzewa(dir_path):
#function is reading folders and sub folders until it gets to a file.
    for name in os.listdir(dir_path):
        full_path = os.path.join(dir_path, name)
        print full_path
        if os.path.isdir(full_path):
            wyswietlanie_drzewa(full_path)

My question is how to get word frequencies from this files?
I will be glad to get any help.

Krisbee




More information about the Python-list mailing list