コード例 #1
0
 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
コード例 #2
0
ファイル: machine.py プロジェクト: johan--/patent-generator
 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
コード例 #3
0
ファイル: machine.py プロジェクト: johan--/patent-generator
 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)
コード例 #4
0
ファイル: machine.py プロジェクト: GDXN/patent-generator
 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) 
コード例 #5
0
 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)
コード例 #6
0
 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
コード例 #7
0
ファイル: machine.py プロジェクト: johan--/patent-generator
 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
コード例 #8
0
 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