def main(): print("Enter search query") query = raw_input() q = link_extractor.main(query) print "HTML data extracted" summary.main(query)
def main(): parse.main() wait_enter() search.main() wait_enter() test.main() wait_enter() summary.main()
def summary_para(inputfile): name, ext = inputfile.split("."); summaryfile = name+"_summary.txt" if os.path.exists(summaryfile): os.remove(summaryfile) try: fi = open(inputfile, 'r',encoding="utf8") contents = fi.read() except Exception as e: fi = open(inputfile, 'r') contents = fi.read() for para in paragraphs(contents): try: summary.main(summaryfile, para) except Exception as e: pass fi.close()
def summary_para(inputfile): #uses summary class to find generate filename_summary.txt(summary of the pdf/word ) name, ext = inputfile.split(".") summaryfile = name + "_summary.txt" if os.path.exists(summaryfile): os.remove(summaryfile) try: fi = open(inputfile, 'r', encoding="utf8") contents = fi.read() except Exception as e: fi = open(inputfile, 'r') contents = fi.read() for para in paragraphs(contents): try: summary.main(summaryfile, para) except Exception as e: pass fi.close()
def main(argv): """ 同じディレクトリのhtmlファイルをすべて変換 """ outDir = 'result/' inpFiles = '*.htm' # ドロップファイルした時のカレントディレクトリがwindows/system32などになっているので、 # スクリプトのあるディレクトリに移動しておく os.chdir(os.path.abspath(os.path.dirname(__file__))) if len(argv)==0: iafiles = glob.glob(inpFiles) else: iafiles = argv print " Found %d files" % (len(iafiles)) ifiles = [] for j in iafiles: ifiles.append(os.path.basename(j)) if len(ifiles)<=0: print "No file(s) : " + inpFiles raw_input() sys.exit(0) pfiles = [] for fname in ifiles: f = str('"'+str(fname)+'"') pfiles.append(convMT4TestReportHTML2.do_conv(f,outDir)) #------------------------------------------------------ import summary print 'OutputDirectory: ' + str(outDir) summary.main([outDir]) #print "\n*** pfiles ***\n" #print pfiles import analyzeReport for f in pfiles: print f analyzeReport.main(["-o",outDir,"-i",f[1],f[0]+".htm"])
def run(sc, sql_context, isHive): mat.main(sc, sql_context, isHive=True) summary.main(sc, sql_context, isHive=True)
import runexp import testexp import summary memo = "multi_phase/sumo/pipeline" runexp.main(memo) print("****************************** runexp ends (generate, train, test)!! ******************************") summary.main(memo) print("****************************** summary_detail ends ******************************")
def run(sc, sql_context, isHive): mat.main(sc, sql_context, isHive = True) summary.main(sc, sql_context, isHive = True)
import pareTo import trendChart import summary p, month = pareTo.main() trd = trendChart.main(p, month) summary.main(trd, month)
def _close_db(): _conn.commit() _conn.close() summary.main()
index = 0 r = randint(0, len(current[index]) - 1) #print(r) #print(current[index][r]) ans = input() pos, neg = sentiment2.predict(ans) #print("\nPositive: "+pos+"\nnegative: "+neg) answers.append(ans) stage.append(ans) if (pos > neg): r2 = randint(0, len(current[index + 1]) - 1) print(current[index + 1][r2]) ans2 = input() answers.append(ans2) stage.append(ans2) else: r3 = randint(0, len(current[index + 2]) - 1) print(current[index + 2][r3]) ans3 = input() answers.append(ans3) stage.append(ans3) stage = ' '.join(stage) pos, neg = sentiment2.predict(stage) #print("\nPositive: "+pos+"\nnegative: "+neg) answers = '\n'.join(answers) summary.main(answers)