+
    	iW&                        R t ^ RIt^ RIHt ^ RIHt R;ttRt/ t	]P                  ! R4      P                  t]P                  ! R4      P                  tRt/ t ]P"                  ! R4      t]! ]P/                  4       4       FP  t]P2                  R
8X  g   K  ]P4                  ^R t]]]&   ]P7                  R4      ^ ,          t]]9  g   KK  ]]]&   KR  	  ] U u/ uF  q P;                  4       V bK  	  up tR t ! R R4      t  ! R R]!4      t" ! R R4      t# ! R R4      t$R#   ] d    ]! ]4      P*                  R	,          t Li ; iu up i )zY

Pyphen
======

Pure Python module to hyphenate text, inspired by Ruby's Text::Hyphen.

N)	resources)Pathz0.17.2Pyphenz\^{2}([0-9a-f]{2})z
(\d?)(\D?)zpyphen.dictionariesdictionariesz.dic_c                    V P                  RR4      P                  4       P                  R4      pV'       d<   RP                  V4      p V \        9   d   \        V ,          # VP                  4        KC  R# )zGet a fallback language available in our dictionaries.

http://www.unicode.org/reports/tr35/#Locale_Inheritance

We use the normal truncation inheritance. This function needs aliases
including scripts for languages with multiple regions available.

-r   N)replacelowersplitjoinLANGUAGES_LOWERCASEpop)languagepartss   & U/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/pyphen/__init__.pylanguage_fallbackr   /   s\     S#&,,.44S9E
88E?**&x00			     c                   0   a  ] tR t^@t o RtR tR tRtV tR# )AlternativeParserzParser of nonstandard hyphen pattern alternative.

The instance returns a special int with data about the current position in
the pattern when called with an odd value.

c                   VP                  R 4      pV^ ,          V n        \        V^,          4      V n        \        V^,          4      V n        VP                  R4      '       d   V ;P                  ^,          un        R# R# ),.N)r   changeintindexcut
startswith)selfpatternalternatives   &&&r   __init__AlternativeParser.__init__G   s`    !'',!!nQ(
{1~&c""JJ!OJ #r   c                    V ;P                   ^,          un         \        V4      pV^,          '       d-   \        WP                  V P                   V P                  34      # V#    )r   r   DataIntr   r   )r   values   &&r   __call__AlternativeParser.__call__O   sD    

a
E
1995;;

DHH"EFFLr   )r   r   r   N)	__name__
__module____qualname____firstlineno____doc__r!   r(   __static_attributes____classdictcell____classdict__s   @r   r   r   @   s      r   r   c                   .   a  ] tR t^Xt o RtRR ltRtV tR# )r&   zE``int`` with some other data can be stuck to in a ``data`` attribute.Nc                    \         P                  W4      pV'       d*   \        V\        4      '       d   VP                  Vn        V# W$n        V# )zmCreate a new ``DataInt``.

Call with ``reference=dataint_object`` to use the data from another
``DataInt``.

)r   __new__
isinstancer&   data)clsr'   r7   	referenceobjs   &&&& r   r5   DataInt.__new__Z   s?     kk#%Iw77 ~~CH 
 H
r    )NN)r*   r+   r,   r-   r.   r5   r/   r0   r1   s   @r   r&   r&   X   s     O r   r&   c                   0   a  ] tR t^it o RtR tR tRtV tR# )HyphDictzHyphenation patterns.c                   / V n         VP                  R4      ;_uu_ 4       pVP                  4       P                  4       pRRR4       XP	                  4       R8X  d   RpVP                  V4      P                  R4      R,           EF+  pVP                  4       pV'       d   VP                  \        4      '       d   K9  \        R V4      pRV9   d(   R	V9   d!   VP                  R^4      w  rE\        WE4      pM\        p\        \        V4       UUu. uF  w  rxY! T;'       g    R
4      3NK  	  upp!  w  r\        V
4      ^ 8X  d   K  ^ \!        V
4      rW,          '       g   V^,          pK  W^,
          ,          '       g   V^,          pK   WW 3V P                   RP#                  V	4      &   EK.  	  / V n        \        R V P                    4       4      V n        R#   + '       g   i     EL; iu uppi )zXRead a ``hyph_*.dic`` and parse its patterns.

:param path: Path of hyph_*.dic to read

rbNzmicrosoft-cp1251cp1251
:r%   NNc                 J    \        \        V P                  ^4      ^4      4      # r$   )chrr   group)matchs   &r   <lambda>#HyphDict.__init__.<locals>.<lambda>   s    c#ekk!nb"9:r   /=0 c              3   8   "   T F  p\        V4      x  K  	  R # 5i)N)len).0keys   & r   	<genexpr>$HyphDict.__init__.<locals>.<genexpr>   s     <ms#c((ms   )patternsopenreadlinedecoder
   	read_textr   stripr   ignored	parse_hexr   r   zipparsemaxrN   r   cachemaxlen)r   pathfdencodingr   r    factoryistringtagsvaluesstartends   &&           r   r!   HyphDict.__init__l   s     YYt__{{}++-H >>11H~~h/55d;B??GmmoGg0099  :GEG g~#.'.}}S!'<$+GA=B7^!M=K	c*+^!M NLD 6{a CK3mm
1Wooq+02C+CDMM"''$-(= @@ 
<dmm<<M __*!Ms   G G4%G4 G1	c           	        VP                  4       pV P                  P                  V4      pVEfF   RV R2p^ .\        V4      ^,           ,          p\	        \        V4      ^,
          4       F  p\        WPP                  ,           \        V4      4      ^,           p\	        V^,           V4       Fo  pV P                  P                  W5V 4      pV'       g   K*  Vw  r\        WY,           WY,           \        V
4      ,           4      p\        \        WV,          4      WK&   Kq  	  K  	  \        V4       UUu. uF*  w  r\V^,          '       g   K  \        V^,
          VR7      NK,  	  upp;V P                  V&   pV# u uppi )a~  Get a list of positions where the word can be hyphenated.

:param word: unicode string of the word to hyphenate

E.g. for the dutch word 'lettergrepen' this method returns ``[3, 6,
9]``.

Each position is a ``DataInt`` with a data attribute.

If the data attribute is not ``None``, it contains a tuple with
information about nonstandard hyphenation at that point: ``(change,
index, cut)``.

change
  a string like ``'ff=f'``, that describes how hyphenation should
  take place.

index
  where to substitute the change, counting from the current point

cut
  how many characters to remove while substituting the nonstandard
  hyphenation

r   )r9   )r
   r^   getrN   rangeminr_   rS   slicemapr]   	enumerater&   )r   wordpointspointed_word
referencesrd   stopjr   offsetrg   slice_r9   s   &&           r   	positionsHyphDict.positions   sA   4 zz|%>tfA;LL 1A 56J3|,q011{{?C,=>Bq1ud+A"mm//q0ABG" %,NF"1:qzCK/GHF),S&V:L)MJ& , 2 %.j$9)L$9LAY]] 4A3$9)L LDJJtv )Ls   3E8E8)r^   r_   rS   N)	r*   r+   r,   r-   r.   r!   rz   r/   r0   r1   s   @r   r>   r>   i   s     /=b- -r   r>   c                   R   a  ] tR t^t o RtR	R ltR tR tR
R ltR
R lt	]t
RtV tR# )r   zEHyphenation class, with methods to hyphenate strings in various ways.Nc                    W4uV n         V n        V'       d   \        V4      M\        \	        V4      ,          pV'       d   V\
        9  d   \        V4      \
        V&   \
        V,          V n        R# )a  Create an hyphenation instance for given lang or filename.

:param filename: filename or Path of hyph_*.dic to read
:param lang: lang of the included dict to use if no filename is given
:param left: minimum number of characters of the first syllabe
:param right: minimum number of characters of the last syllabe
:param cache: if ``True``, use cached copy of the hyphenation patterns

N)leftrightr   	LANGUAGESr   hdcacher>   hd)r   filenamelangr~   r   r^   r`   s   &&&&&& r   r!   Pyphen.__init__   sL     !%	4:!)tH~y9J49P/QG+$TNGDM$-r   c                    \        V4      V P                  ,
          pV P                  P                  V4       Uu. uF#  q0P                  Tu;8:  d
   V8:  g   K  M K!  VNK%  	  up# u upi )zGet a list of positions where the word can be hyphenated.

:param word: unicode string of the word to hyphenate

See also ``HyphDict.positions``. The points that are too far to the
left or right are removed.

)rN   r   r   rz   r~   )r   rr   r   rd   s   &&  r   rz   Pyphen.positions   sR     D	DJJ&77,,T2N2aii16M6M6M2NNNs   A&A&A&c              #  l  "   \        V P                  V4      4       F  pVP                  '       dr   VP                  w  r4pWB,          pVP                  4       '       d   VP	                  4       pVP                  R4      w  rgVRV V,           WqWE,           R ,           3x  K  VRV WR 3x  K  	  R# 5i)zvIterate over all hyphenation possibilities, the longest first.

:param word: unicode string of the word to hyphenate

rJ   N)reversedrz   r7   isupperupperr   )r   rr   positionr   r   r   c1c2s   &&      r   iteratePyphen.iterate   s      !!56H}}}%-]]"s!<<>>#\\^Fc*6ElR'5;<.@)@@@9HotI66 7s   B2B4c                    V\        V4      ,          pV P                  V4       F!  w  rE\        V4      V8:  g   K  WC,           V3u # 	  R# )a|  Get the longest possible first part and the last part of a word.

:param word: unicode string of the word to hyphenate
:param width: maximum length of the first part
:param hyphen: unicode string used as hyphen character

The first part has the hyphen already attached.

Returns ``None`` if there is no hyphenation point before ``width``, or
if the word could not be hyphenated.

N)rN   r   )r   rr   widthhyphenw1w2s   &&&&  r   wrapPyphen.wrap   s?     	Vll4(FB2w%{B& )r   c                t   \        V4      p\        V P                  V4      4       F  pVP                  '       dZ   VP                  w  rVpWd,          pVP	                  4       '       d   VP                  4       pVP                  RV4      W6Wg,           % Kn  VP                  WB4       K  	  RP                  V4      # )as  Get the word as a string with all the possible hyphens inserted.

:param word: unicode string of the word to hyphenate
:param hyphen: unicode string used as hyphen character

E.g. for the dutch word ``'lettergrepen'``, this method returns the
unicode string ``'let-ter-gre-pen'``. The hyphen string to use can be
given as the second parameter, that defaults to ``'-'``.

rJ   rL   )	listr   rz   r7   r   r   r	   insertr   )r   rr   r   lettersr   r   r   r   s   &&&     r   insertedPyphen.inserted  s     t* !56H}}}%-]]"s!<<>>#\\^F-3^^C-Hek*x0 7 wwwr   )r   r~   r   )NN   r   T)r   )r*   r+   r,   r-   r.   r!   rz   r   r   r   r(   r/   r0   r1   s   @r   r   r      s)     O  
O7$'$ 2 Hr   )r   r   r   )%#LEFTHYPHENMINRIGHTHYPHENMINCOMPOUNDLEFTHYPHENMINCOMPOUNDRIGHTHYPHENMIN)%r.   re	importlibr   pathlibr   VERSION__version____all__r   compilesubrZ   findallr\   rY   r   filesr   	TypeError__file__parentsortediterdirr`   suffixnamer   
short_namer
   r   r   r   r   r&   r>   r   )r   s   0r   <module>r      sZ   
     +
6  JJ,-11	


=!))7
 	:??#89L <'')*D{{fyy2	$ZZ_Q'
Y&$(Ij! + 7@@idzz|T)i@ " 0c "a aH\ \Y  :>((>9L: As   D" E" EE