
    =wg
                     0     G d  de       Z G d de       Zy)c                       e Zd ZdZd Zy)_ScandinavianStemmerz
    This subclass encapsulates a method for defining the string region R1.
    It is used by the Danish, Norwegian, and Swedish stemmer.

    c                    d}t        dt        |            D ]g  }||   |vs||dz
     |v st        |d|dz          dk  rt        |d|dz          dkD  r|dd } |S t        |d|dz          dk\  r||dz   d } |S |c S  |S )ar  
        Return the region R1 that is used by the Scandinavian stemmers.

        R1 is the region after the first non-vowel following a vowel,
        or is the null region at the end of the word if there is no
        such non-vowel. But then R1 is adjusted so that the region
        before it contains at least three letters.

        :param word: The word whose region R1 is determined.
        :type word: str or unicode
        :param vowels: The vowels of the respective language that are
                       used to determine the region R1.
        :type vowels: unicode
        :return: the region R1 for the respective word.
        :rtype: unicode
        :note: This helper method is invoked by the respective stem method of
               the subclasses DanishStemmer, NorwegianStemmer, and
               SwedishStemmer. It is not to be invoked directly!

            N       rangelen)selfwordvowelsr1is        Q/var/www/horilla/myenv/lib/python3.12/site-packages/whoosh/lang/snowball/bases.py_r1_scandinavianz%_ScandinavianStemmer._r1_scandinavian   s    * q#d)$ 	AAwf$a!e)>tFQU|$q(Sfq1u->-BabB
 	 fq1u&!+a!efB 	  K	 	    N)__name__
__module____qualname____doc__r    r   r   r   r      s     r   r   c                       e Zd ZdZd Zd Zy)_StandardStemmerz}
    This subclass encapsulates two methods for defining the standard versions
    of the string regions R1, R2, and RV.
    c                     d}d}t        dt        |            D ]  }||   |vs||dz
     |v s||dz   d } n t        dt        |            D ]!  }||   |vs||dz
     |v s||dz   d } ||fS  ||fS )a  
        Return the standard interpretations of the string regions R1 and R2.

        R1 is the region after the first non-vowel following a vowel,
        or is the null region at the end of the word if there is no
        such non-vowel.

        R2 is the region after the first non-vowel following a vowel
        in R1, or is the null region at the end of the word if there
        is no such non-vowel.

        :param word: The word whose regions R1 and R2 are determined.
        :type word: str or unicode
        :param vowels: The vowels of the respective language that are
                       used to determine the regions R1 and R2.
        :type vowels: unicode
        :return: (r1,r2), the regions R1 and R2 for the respective word.
        :rtype: tuple
        :note: This helper method is invoked by the respective stem method of
               the subclasses DutchStemmer, FinnishStemmer,
               FrenchStemmer, GermanStemmer, ItalianStemmer,
               PortugueseStemmer, RomanianStemmer, and SpanishStemmer.
               It is not to be invoked directly!
        :note: A detailed description of how to define R1 and R2
               can be found at http://snowball.tartarus.org/texts/r1r2.html

        r   r   Nr	   )r   r   r   r   r2r   s         r   _r1r2_standardz_StandardStemmer._r1r2_standard5   s    8 q#d)$ 	AAwf$a!e)>!a%&\	
 q#b'" 	A!uF"r!a%yF':AZBx	
 Bxr   c                    d}t        |      dk\  ro|d   |vr.t        dt        |            D ]  }||   |v s||dz   d } |S  |S |dd |v r.t        dt        |            D ]  }||   |vs||dz   d } |S  |S |dd }|S )a  
        Return the standard interpretation of the string region RV.

        If the second letter is a consonant, RV is the region after the
        next following vowel. If the first two letters are vowels, RV is
        the region after the next following consonant. Otherwise, RV is
        the region after the third letter.

        :param word: The word whose region RV is determined.
        :type word: str or unicode
        :param vowels: The vowels of the respective language that are
                       used to determine the region RV.
        :type vowels: unicode
        :return: the region RV for the respective word.
        :rtype: unicode
        :note: This helper method is invoked by the respective stem method of
               the subclasses ItalianStemmer, PortugueseStemmer,
               RomanianStemmer, and SpanishStemmer. It is not to be
               invoked directly!

        r      r   Nr   )r   r
   )r   r   r   rvr   s        r   _rv_standardz_StandardStemmer._rv_standard_   s    , t9>Awf$q#d), AAw&(!!a%&\ 	 	 bqV#q#d), AAwf,!!a%&\ 	 	 !"X	r   N)r   r   r   r   r   r!   r   r   r   r   r   /   s    
(T&r   r   N)objectr   r   r   r   r   <module>r#      s    (6 (VVv Vr   