
    i              
           d dl mZ d dlmZmZmZmZ d dlmZ ddl	m
Z
 ddlmZ ddlmZ eee      Zee   Z e
j$                  d      d	eeef   fd
       Zdeeef   deded	eeef   fdZy)    )c_uint64)CallableListSequenceTuple)hash_unicode   )registry)Model)Ints2dzstrings2arrays.v1returnc                  "    t        dt              S )z=Transform a sequence of string sequences to a list of arrays.strings2arrays)r   forward     l/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/thinc/layers/strings2arrays.pyr   r      s     !7++r   modelXsis_trainc                 r   |D cg c].  }|D cg c]   }t        t        |            j                  " c}0 }}}|D cg c]  }| j                  j	                  |d      ! }}|D cg c]  }| j                  j                  |dd      ! }	}dt        dt        fd}
|	|
fS c c}w c c}}w c c}w c c}w )Nuint64)dtype   dXr   c                     g S )Nr   )r   s    r   backpropzforward.<locals>.backprop   s    	r   )r   r   valueops	asarray1i	reshape2iOutTInT)r   r   r   Xwordhasheshhash_arraysarrayarraysr   s              r   r   r      s     KMMQa@dxT*+11@MFMCIJa599&&q&9JKJ=HIEeii!!%Q/IFIT c  8 AMJIs!   	B)%B$B) $B/*$B4$B)N)ctypesr   typingr   r   r   r   
murmurhashr   configr
   r   r   typesr   strr$   r#   layersr   boolr   r   r   r   <module>r4      s     2 2 #   x}F| $%,c4i( , &,

5d# 
 
 
tX~AV 
r   