format('Y-m-d-H-i-s'); $summarizerCodeFileContentsSnapshot = file_get_contents($summarizerCodeFileName); for($weightsToTry; $weightsToTry > 0; $weightsToTry -= 20) { $summarizerCodeFileContents = ""; $file = fopen($summarizerCodeFileName, "r"); while(!feof($file)){ $line = fgets($file); if (strpos(mb_strtolower($line), mb_strtolower($wieghtCodeToModify)) === false) { if ($summarizerCodeFileContents == "") { $summarizerCodeFileContents = $line; } else { $summarizerCodeFileContents = $summarizerCodeFileContents . $line; } } else { if ($summarizerCodeFileContents == "") { $summarizerCodeFileContents = " " . $wieghtCodeToModify . $weightsToTry . ";\r\n"; } else { $summarizerCodeFileContents = $summarizerCodeFileContents . " " . $wieghtCodeToModify . $weightsToTry . ";\r\n"; } } } fclose($file); file_put_contents($summarizerCodeFileName, $summarizerCodeFileContents); runTests(); } file_put_contents($summarizerCodeFileName, $summarizerCodeFileContentsSnapshot); $dateTime = new DateTime('NOW'); echo "Completed at " . $dateTime->format('Y-m-d-H-i-s'); function runTests() { PageProcessor::$max_description_len = 2000; $_REQUEST['page_type'] = "text/html"; $_REQUEST['option_type'] = "test_options"; $_REQUEST['page_rules'] = ""; $crawlComponent = new CrawlComponent(new AdminController()); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/Agile tasks lists, what does done mean in " . "Agile_ _ CS200W Blog.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "AgiletaskslistswhatdoesdonemeaninAgileCS200WBlog.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/Delivering a project and presenting to a " . "multi-level audience _ CS200W Blog.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "DeliveringaprojectandpresentingtoamultilevelaudienceCS200WBlog.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/Handing off a project to a client; what are " . "the risks and challenges_ _ CS20.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "HandingoffaprojecttoaclientwhataretherisksandchallengesCS20.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/LinkedIn profiles, how to use them, how to " . "market yourself, how to network _.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "LinkedInprofileshowtousethemhowtomarketyourselfhowtonetwork.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/Social Media and Branding _ CS200W Blog.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "SocialMediaandBrandingCS200WBlog.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/The Agile Team and what is a Backlog_ What " . "are they for and why are they imp.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "TheAgileTeamandwhatisaBacklogWhataretheyforandwhyaretheyimp.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/What five technical skills are employers " . "seeking_ What five soft skills put .txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "WhatfivetechnicalskillsareemployersseekingWhatfivesoftskillsput.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/What is Agile and what are user stories_ _ " . "CS200W Blog.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "WhatisAgileandwhatareuserstoriesCS200WBlog.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/What is an Agile Sprint Retrospective_ _ " . "A busy life of a girl gamer.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "WhatisanAgileSprintRetrospectiveAbusylifeofagirlgamer.html"); $_REQUEST['TESTPAGE'] = file_get_contents("C:/Users/bocage/Desktop/" . "ROUGE-1.5.5/Source/What is an Agile Sprint Retrospective_ _ " . "CS200W Blog.txt"); $crawlComponent->pageOptions(); copy("C:/Temp/out.txt","C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test/" . "Yioop-testRegression/systemsAreGenerated/" . "WhatisanAgileSprintRetrospectiveCS200WBlog.html"); $stringToExecute = "C:/Users/bocage/Desktop/" . "RougeFileHtmlFilePrepper.exe C:/Users/bocage/Desktop/ROUGE-1.5.5/" . "Yioop-test/Yioop-testRegression/systemsAreGenerated"; exec($stringToExecute); $dateTime = new DateTime('NOW'); $objDateTime = $dateTime->format('Y-m-d-H-i-s'); chdir("C:/Users/bocage/Desktop/ROUGE-1.5.5/Yioop-test"); $stringToExecute = "C:/Strawberry/perl/bin/perl.exe ../ROUGE-1.5.5.pl " . "-e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -b 75 -m -s -a " . "Yioop-testRegression.xml > C:/Users/bocage/Desktop/ROUGE-1.5.5/" . "Yioop-test/Yioop-testRegression/Results/"; exec($stringToExecute . $objDateTime . ".txt"); } ?>