utils/website.py
def to_vector(self, vectorizer, text_type):
        """
        Transform website to a vector representation

        Returns:
        --------
        List of real numbers as a vector
        """
        if not self.pages:
            return []
        # Use a random page as website representation
        text = self.pages[0].get_text(text_type)
        vsm_list = vectorizer.transform([text]).todense()
        return vsm_list.tolist()[0]

        Transform website to a vector representation

        Returns:
        --------
        List of real numbers as a vector
        
Transform website to a vector representation
Transform website to a vector representation
def to_vector(self, vectorizer, text_type):
        if not self.pages:
            return []
        text = self.pages[0].get_text(text_type)
        vsm_list = vectorizer.transform([text]).todense()
        return vsm_list.tolist()[0]
def to_vector ( self , vectorizer , text_type ) : if not self . pages : return [ ] text = self . pages [ 0 ] . get_text ( text_type ) vsm_list = vectorizer . transform ( [ text ] ) . todense ( ) return vsm_list . tolist ( ) [ 0 ]
Transform website to a vector representation
Transform website to a vector representation
"""
        Transform website to a vector representation

        Returns:
        --------
        List of real numbers as a vector
        """ # Use a random page as website representation
None
self
vectorizer
text_type