o
    q¦µi8  ã                   @   s(   d Z ddlmZmZ G dd„ deƒZdS )z
Base classes for parser
é    )ÚABCÚabstractmethodc                   @   sP   e Zd ZdZdd„ Zedd„ ƒZedd„ ƒZedd	„ ƒZ	ed
d„ ƒZ
dd„ ZdS )ÚParserz Base class for all parsersc                 C   s6   d| _ || _d| _d| _d| _|  |¡ |  |¡ dS )ÚsetupN)Ú_configÚ	_pipelineÚ	_pretrainÚ_trainerÚ_vocabÚ_set_upÚ_set_up_final_config)ÚselfÚconfigÚpipeline© r   úL/home/ubuntu/.local/lib/python3.10/site-packages/urduhack/pipeline/parser.pyÚ__init__   s   
zParser.__init__c                 C   ó   dS )z> Process a Document.  This is the main method of a processor. Nr   )r   Údocumentr   r   r   Úparse   ó    zParser.parsec                 C   r   )zmodel setupNr   ©r   r   r   r   r   r      r   zParser._set_upc                 C   ó   | j S )z" Configurations for the processor ©r   ©r   r   r   r   r   #   ó   zParser.configc                 C   r   )z- The pipeline that this processor belongs to )r   r   r   r   r   r   (   r   zParser.pipelinec                 C   s
   || _ dS )zV Finalize the configurations for this processor, based off of values from a UD model. Nr   r   r   r   r   r   -   s   
zParser._set_up_final_configN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úpropertyr   r   r   r   r   r   r   r   	   s    



r   N)r   Úabcr   r   r   r   r   r   r   Ú<module>   s   