+
    ʇi                    v    ^ RI Ht ^ RIHt ^ RIHtHt RRRR/R ltRRRR/R ltRRRR/R	 lt	RRRR/R
 lt
R# )    )annotations)conv_sequences)is_nonesetupPandas	processorNscore_cutoffc                   Ve   V! V 4      p V! V4      p\        W4      w  r\        \        V 4      \        V4      4      p\        W4      pWE,
          pVe   Wc8:  d   V# V^,           # )a  
Calculates the postfix distance between two strings.

Parameters
----------
s1 : Sequence[Hashable]
    First string to compare.
s2 : Sequence[Hashable]
    Second string to compare.
processor: callable, optional
    Optional callable that is used to preprocess the strings before
    comparing them. Default is None, which deactivates this behaviour.
score_cutoff : int or None, optional
    Maximum distance between s1 and s2, that is
    considered as a result. If the distance is bigger than score_cutoff,
    score_cutoff + 1 is returned instead. Default is None, which deactivates
    this behaviour.

Returns
-------
distance : int
    distance between s1 and s2
)r   maxlen
similarity)s1s2r   r   maximumsimdists   &&$$   r/Users/max/.openclaw/workspace/postharvest/merge_env/lib/python3.14/site-packages/rapidfuzz/distance/Postfix_py.pydistancer   	   sh    < r]r]B#FB#b'3r7#G
R
C=D (D,@4W|VWGWW    c                   Ve   V! V 4      p V! V4      p\        W4      w  r^ p\        \        V 4      \        V4      4       F  w  rVWV8w  d    MV^,          pK  	  Ve   WC8  d   V# ^ # )a  
Calculates the postfix similarity between two strings.

This is calculated as ``len1 - distance``.

Parameters
----------
s1 : Sequence[Hashable]
    First string to compare.
s2 : Sequence[Hashable]
    Second string to compare.
processor: callable, optional
    Optional callable that is used to preprocess the strings before
    comparing them. Default is None, which deactivates this behaviour.
score_cutoff : int, optional
    Maximum distance between s1 and s2, that is
    considered as a result. If the similarity is smaller than score_cutoff,
    0 is returned instead. Default is None, which deactivates
    this behaviour.

Returns
-------
distance : int
    distance between s1 and s2
)r   zipreversed)r   r   r   r   r   ch1ch2s   &&$$   r   r   r   3   sq    @ r]r]B#FB
Chrl3:q 4
  '3+>3FQFr   c                   \        4        \        V 4      '       g   \        V4      '       d   R# \        WVR7      pRV,
          pVe   WS8:  d   V# R# )a  
Calculates a normalized postfix similarity in the range [1, 0].

This is calculated as ``distance / (len1 + len2)``.

Parameters
----------
s1 : Sequence[Hashable]
    First string to compare.
s2 : Sequence[Hashable]
    Second string to compare.
processor: callable, optional
    Optional callable that is used to preprocess the strings before
    comparing them. Default is None, which deactivates this behaviour.
score_cutoff : float, optional
    Optional argument for a score threshold as a float between 0 and 1.0.
    For norm_dist > score_cutoff 1.0 is returned instead. Default is 1.0,
    which deactivates this behaviour.

Returns
-------
norm_dist : float
    normalized distance between s1 and s2 as a float between 0 and 1.0
      ?)r   )r   r   normalized_similarity)r   r   r   r   norm_sim	norm_dists   &&$$  r   normalized_distancer   a   sH    > Mr{{gbkk$RyAHhI%-1J9TQTTr   c               2   \        4        \        V 4      '       g   \        V4      '       d   R# Ve   V! V 4      p V! V4      p\        W4      w  r\        \	        V 4      \	        V4      4      p\        W4      pV'       d	   WT,          MRpVe   Wc8  d   V# R# )a  
Calculates a normalized postfix similarity in the range [0, 1].

This is calculated as ``1 - normalized_distance``

Parameters
----------
s1 : Sequence[Hashable]
    First string to compare.
s2 : Sequence[Hashable]
    Second string to compare.
processor: callable, optional
    Optional callable that is used to preprocess the strings before
    comparing them. Default is None, which deactivates this behaviour.
score_cutoff : float, optional
    Optional argument for a score threshold as a float between 0 and 1.0.
    For norm_sim < score_cutoff 0 is returned instead. Default is 0,
    which deactivates this behaviour.

Returns
-------
norm_sim : float
    normalized similarity between s1 and s2 as a float between 0 and 1.0
g        r   )r   r   r   r
   r   r   )r   r   r   r   r   r   r   s   &&$$   r   r   r      s    > Mr{{gbkkr]r]B#FB#b'3r7#G
R
C 's}SH$,0H8RsRr   )
__future__r   rapidfuzz._common_pyr   rapidfuzz._utilsr   r   r   r   r   r    r   r   <module>r%      s    # / 1'X 	'X
 'XT+G 	+G
 +G\&U 	&U
 &UR,S 	,S
 ,Sr   