def make_name_one(self): title_combos = search.hypernym_combo(text, 'instrumentality', 'JJ NP') title_combos = [ t for t in title_combos if t.endswith('round') == False ] title = random.choice(title_combos) return title
def body_old(self): output = [] useful_phrases = search.hypernym_combo(text, "instrumentality", "JJ? NP") random.shuffle(useful_phrases) random.shuffle(self.possible_titles) for i in range(len(self.possible_titles)): if i < len(useful_phrases) and self.possible_titles[i] != self.partial_title: output.append(useful_phrases[i] + " for " + self.possible_titles[i]) return output
def create_abstract(self): artifacts = search.hypernym_combo(self.source_text, "artifact", "JJ NN|NNS") # artifacts +=search.hypernym_combo(self.source_text, 'material', "JJ NN|NNS") artifacts = set(artifacts) self.artifacts = artifacts words = [] words = ["an " + w if w[0] in "aeiou" else "a " + w for w in artifacts] self.abstract = self.title + ". " self.abstract += "The devices comprises " self.abstract += ", ".join(words)
def create_abstract(self): artifacts = search.hypernym_combo(self.source_text, 'artifact', "JJ NN|NNS") #artifacts +=search.hypernym_combo(self.source_text, 'material', "JJ NN|NNS") artifacts = set(artifacts) self.artifacts = artifacts words = [] words = [referenced(w) for w in artifacts] self.abstract = self.title + ". " self.abstract += "The devices comprises " self.abstract += ", ".join(words)
def body_old(self): output = [] useful_phrases = search.hypernym_combo(text, 'instrumentality', 'JJ? NP') random.shuffle(useful_phrases) random.shuffle(self.possible_titles) for i in range(len(self.possible_titles)): if (i < len(useful_phrases) and self.possible_titles[i] != self.partial_title): output.append(useful_phrases[i] + ' for ' + self.possible_titles[i]) return output
def make_name_one(self): title_combos = search.hypernym_combo(text, "instrumentality", "JJ NP") title_combos = [t for t in title_combos if t.endswith("round") == False] title = random.choice(title_combos) return title
def make_name_one(self): title_combos = search.hypernym_combo(text, 'instrumentality', 'JJ NP') title_combos = [t for t in title_combos if t.endswith('round') == False] title = random.choice(title_combos) return title