Exemplo n.º 1
0
 def __init__(self, documents = [], transforms = [TFIDF, LSA]):
 	self.vectors = []
 	self.parser = Parser()
 	if len(documents) > 0:
 		self._build(documents, transforms)
     self.vector_to_doc = {}
     self.jokes = documents #added this instance variable to contain actual jokes
Exemplo n.º 2
0
    def __init__(self, documents=[], transforms=[TFIDF, LSA]):
        self.collection_of_document_term_vectors = []

        self.transformed_matrix = []
        self.parser = Parser()
        if len(documents) > 0:
            self._build(documents, transforms)
Exemplo n.º 3
0
    def __init__(self, documentsdict={}, transforms=[TFIDF, LSA]):
        self.collection_of_document_term_vectors = []
        self.documents = []
        self.file_path_all = []
        self.document_ID_file_info_mapping = {}
        self.transformed_matrix = []
        self.parser = Parser()

        self._addToList(documentsdict)
        if len(self.documents) > 0:
            self._build(self.documents, transforms)
Exemplo n.º 4
0
 def create_parser(self):
   return Parser(ParserTest.FakeStopWords())
Exemplo n.º 5
0
 def create_parser_with_stopwords(self, words_string):
   return Parser(ParserTest.FakeStopWords(words_string))