a
     g                     @   sF   d Z ddlmZ ddlmZ G dd dZdeeee ddd	Zd
S )z
Wrapper for AttaCut - Fast and Reasonably Accurate Word Tokenizer for Thai

:See Also:
    * `GitHub repository <https://github.com/PyThaiNLP/attacut>`_
    )List)	Tokenizerc                   @   s*   e Zd ZdddZeee dddZdS )	AttacutTokenizer
attacut-scc                 C   s&   d| _ |dkrd| _ t| j d| _d S )Nr   z	attacut-c)model)Z_MODEL_NAMEr   
_tokenizer)selfr    r	   D/usr/local/lib/python3.9/dist-packages/pythainlp/tokenize/attacut.py__init__   s    zAttacutTokenizer.__init__)textreturnc                 C   s   | j |S )N)r   tokenize)r   r   r	   r	   r
   r      s    zAttacutTokenizer.tokenizeN)r   )__name__
__module____qualname__r   strr   r   r	   r	   r	   r
   r      s   
r   r   )r   r   r   c                 C   s$   | rt | tsg S t|}|| S )a  
    Wrapper for AttaCut - Fast and Reasonably Accurate Word Tokenizer for Thai
    :param str text: text to be tokenized to words
    :param str model: model of word tokenizer model
    :return: list of words, tokenized from the text
    :rtype: list[str]
    **Options for model**
        * *attacut-sc* (default) using both syllable and character features
        * *attacut-c* using only character feature
    )
isinstancer   r   r   )r   r   r   r	   r	   r
   segment   s    r   N)r   )__doc__typingr   Zattacutr   r   r   r   r	   r	   r	   r
   <module>   s   