Basic Programming 9 - Aggregate Words to Single Document
Download the example text directory from Canvas. Read all text files in the directory. Write a program to save words and their counts aggregated across all these text files to ''. hint: after download the zipped file, extract it to a directory, your program first needs to list all files in a directory ( files-in-a-directory-in-python 2) Then, you may use file read method (section 7.4 in Python book) to read content from each file. use late() method to replace punctuations as shown on page 116 of the Python book ", uation)) line = line. translate(rans('', line = () words = ()
Gekoppeld boek
- Onbekend
- 9781530051120
- 1
Geschreven voor
- Instelling
- University Of Oklahoma
- Vak
- LIS 4970 IR & Text Mining (LIS4970)
Documentinformatie
- Geüpload op
- 1 augustus 2021
- Aantal pagina's
- 2
- Geschreven in
- 2021/2022
- Type
- Overig
- Persoon
- Onbekend
Onderwerpen
-
aggregate
-
python
-
txt
-
linesplit
-
linelower
-
linemaketrans