o
    Ni	                     @   s\   d Z ddlmZ ddlmZ ddlmZ ddlmZ dZdZ	dZ
d	ZG d
d dejjZdS )&Librispeech language modeling dataset.    )absolute_import)division)print_functionNan  @inproceedings{panayotov2015librispeech,
  title={Librispeech: an ASR corpus based on public domain audio books},
  author={Panayotov, Vassil and Chen, Guoguo and Povey, Daniel and Khudanpur, Sanjeev},
  booktitle={Acoustics, Speech and Signal Processing (ICASSP), 2015 IEEE International Conference on},
  pages={5206--5210},
  year={2015},
  organization={IEEE}
}
zWLanguage modeling resources to be used in conjunction with the LibriSpeech ASR corpus.
zhttp://www.openslr.org/11z>http://www.openslr.org/resources/11/librispeech-lm-norm.txt.gzc                   @   s4   e Zd ZdZejdZdd Zdd Z	dd Z
d	S )
LibrispeechLmr   z0.1.0c                 C   s*   t jj| tt jdt j idttdS )Ntext)r   r   )builderdescriptionfeaturessupervised_keyshomepagecitation)	tfdscoreDatasetInfo_DESCRIPTIONr
   FeaturesDictText_URL	_CITATION)self r   [/home/ubuntu/.local/lib/python3.10/site-packages/tensorflow_datasets/text/librispeech_lm.py_info2   s   
zLibrispeechLm._infoc                 C   s*   | t}tjjtjjd||idgS )zReturns SplitGenerators.
files_iter)name
gen_kwargs)download_DL_URLr   r   SplitGeneratorSplitTRAINiter_archive)r   
dl_managerarchive_pathr   r   r   _split_generators>   s   
zLibrispeechLm._split_generatorsc                 c   s>    t |\}}t|D ]\}}| }|r|d|ifV  qdS )zYields examples.r   N)next	enumeratestrip)r   r   _fkeyliner   r   r   r   _generate_examplesH   s   z LibrispeechLm._generate_examplesN)__name__
__module____qualname____doc__r   r   VersionVERSIONr   r%   r-   r   r   r   r   r   -   s    
r   )r1   
__future__r   r   r   tensorflow_datasets.public_api
public_apir   r   r   r   r   r   GeneratorBasedBuilderr   r   r   r   r   <module>   s   