Em Segunda 23 Outubro 2006 18:03, Asrarahmed Kadri escreveu:
> Folks,
>
> I have written a program which calculates teh frequency of each word that
> appears in a file. I would like to have your feedback.

Sorry, I couldn't resist. Others talked about your code, but here's what I use 
(no, it's not python, it's just linux utils):

$ sed -e 's/[[:space:]]/\n/g' -e 's/.*/\L&/g' -e 's/[][,;.:()]//g' 
myfile.txt | sort -d | uniq -c | sort -n

Tiago.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to