coordle/preprocessing/cord_19_data.py
def _extract_language(self, text: str) -> str:
        '''Extracts the language from the given text using spaCy
        
        Args:
            text: Text to extract language from
        
        Returns:
            lang: Predicted language of text
        '''
        # Extract language using spaCy

        text_first_words = ' '.join(text.split(maxsplit=self.nlp_words_to_check)[:self.nlp_words_to_check])
        lang = self.nlp(text_first_words)._.language['language']
        
        return lang
Extracts the language from the given text using spaCy
        
        Args:
            text: Text to extract language from
        
        Returns:
            lang: Predicted language of text
        
Extracts the language from the given text using spaCy
Extracts the language from the given text using spaCy
def _extract_language(self, text: str) -> str:
        text_first_words = ' '.join(text.split(maxsplit=self.nlp_words_to_check)[:self.nlp_words_to_check])
        lang = self.nlp(text_first_words)._.language['language']
        return lang
def _extract_language ( self , text : str ) -> str : text_first_words = ' ' . join ( text . split ( maxsplit = self . nlp_words_to_check ) [ : self . nlp_words_to_check ] ) lang = self . nlp ( text_first_words ) . _ . language [ 'language' ] return lang
Extracts the language from the given text using spaCy
Extracts the language from the given text using spaCy
'''Extracts the language from the given text using spaCy
        
        Args:
            text: Text to extract language from
        
        Returns:
            lang: Predicted language of text
        ''' # Extract language using spaCy
Predicted language of text
Predicted language of text
lang
self
text
str
Text to extract language from
Text to extract language from