def preprocess(self): """[preprocess the corpus and create spacy objects for corpus and questions] """ p = Parse() self.corpus = p.parseCorpus(self.article) self.questions = re.sub(r"[\n]+", " ", self.questions) self.spacyCorpus = self.nlp(self.corpus)
def preprocess(self): """Method that will preprocess the corpus and intialize the spacy model Parameters ---------- Returns ------- """ p = Parse() self.corpus = p.parseCorpus(self.article) self.spacyCorpus = self.nlp(self.corpus)