a
     g:                  	   @   sf   d Z ddlmZ ddlmZ dadadeeeeeeee d
ddZ	deeeeeee dddZ
dS )z
Where's the Point? Self-Supervised Multilingual Punctuation-Agnostic Sentence Segmentation

GitHub: https://github.com/bminixhofer/wtpsplit
    )List)WtPNthwtp-bert-minisentence      ?newline)text	lang_codemodeltokenizeparagraph_thresholdstylereturnc                 C   sv   t |krt|da|a |dkr,tj| |dS |dkrFtj| |d|dS |dkrbtj| |d||dS td	| d
d S )N)Zmodel_name_or_modelr   )r
   r   T)r
   do_paragraph_segmentationr   Zopus100)r
   r   	thresholdr   zSegmentation style "zS" not found.
              It might be a typo; if not, please consult our document.)_MODEL_NAMEr   _MODELsplit
ValueError)r	   r
   r   r   r   r    r   D/usr/local/lib/python3.9/dist-packages/pythainlp/tokenize/wtsplit.py	_tokenize   s.    


r   mini)r	   sizer   r   r   r   c                 C   sD   d}|dkrd}n |dkr d}n|dkr.d}nd}t | ||||d	S )
N Ztinyzwtp-bert-tinybasezwtp-canine-s-1lZlargezwtp-canine-s-12lr   )r   r   r   r   )r   )r	   r   r   r   r   Z_model_loadr   r   r   r   7   s    r   )r   r   r   r   r   )r   r   r   r   )__doc__typingr   Zwtpsplitr   r   r   strfloatr   r   r   r   r   r   <module>   s<        )    