o
    nf                     @   s    d dl Z d dlmZ dd ZdS )    N)Counterc           
      C   s   t | ddd}| }W d    n1 sw   Y  tddtj}|| }| }t	|}t
t| dd d}| D ]\}}	td| d	|	  qBd S )
Nrzutf-8)encoding c                 S   s   | d  | d fS )N   r    )itemr   r   5/workspaces/Masterarbeit/1_word_count/output_11_RP.py<lambda>   s    zword_count.<locals>.<lambda>)key'z': )openreadstr	maketransstringpunctuation	translatelowersplitr   dictsorteditemsprint)
	file_pathfiletextZ
translatorZcleaned_textwordsword_countssorted_word_countswordcountr   r   r	   
word_count   s   
r"   )r   collectionsr   r"   r   r   r   r	   <module>   s    