def _sb_r1(self, term, r1_prefixes=None):
vowel_found = False<EOL>if hasattr(r1_prefixes, '<STR_LIT>'):<EOL><INDENT>for prefix in r1_prefixes:<EOL><INDENT>if term[: len(prefix)] == prefix:<EOL><INDENT>return len(prefix)<EOL><DEDENT><DEDENT><DEDENT>for i in range(len(term)):<EOL><INDENT>if not vowel_found and term[i] in self._vowels:<EOL><INDENT>vowel_found = True<EOL><DEDENT>elif vowel_found and term[i] not in self._vowels:<EOL><INDENT>return i + <NUM_LIT:1><EOL><DEDENT><DEDENT>return len(term)<EOL>
Return the R1 region, as defined in the Porter2 specification.

        Parameters
        ----------
        term : str
            The term to examine
        r1_prefixes : set
            Prefixes to consider

        Returns
        -------
        int
            Length of the R1 region