From: Nathan TeBlunthuis Date: Sat, 9 Nov 2019 20:19:55 +0000 (-0800) Subject: validate tests and add asserts and baselines for regex tests. X-Git-Url: https://code.communitydata.science/mediawiki_dump_tools.git/commitdiff_plain/414cc5ff2d86c007b1a00c829c779627ea3b18d7 validate tests and add asserts and baselines for regex tests. --- diff --git a/test/Wikiq_Unit_Test.py b/test/Wikiq_Unit_Test.py index 159fd10..14d38f1 100644 --- a/test/Wikiq_Unit_Test.py +++ b/test/Wikiq_Unit_Test.py @@ -305,27 +305,33 @@ class Test_Regex(unittest.TestCase): self.baseline_output_dir = "baseline_output" # sample inputs for checking that bad inputs get terminated / test_regex_inputs - self.bad_input1 = "-RP '\\b\\d+\\b'" #label is missing - self.bad_input2 = "-RP 'NPO V' -RP THE -RPl testlabel" #number of reg and number of labels do not match - self.bad_input3 = "-CP '(Tamil|Li)' -RPl testlabel" #cp but rp label - self.bad_input4 = "-CPl testlabel" #regex is missing - self.bad_input5 = "-RP '\\b\\w{3}\\b' -RPl threeletters -CP '\\b\\w{3}\\b'" - - self.bad_inputs_list = [self.bad_input1,self.bad_input2,self.bad_input3,self.bad_input4,self.bad_input5] + self.bad_inputs_list = [ + #label is missing + "-RP '\\b\\d+\\b'", + #number of reg and number of labels do not match + "-RP 'NPO V' -RP THE -RPl testlabel", + #cp but rp label + "-CP '(Tamil|Li)' -RPl testlabel", + #regex is missing + "-CPl testlabel", + "-RP '\\b\\w{3}\\b' -RPl threeletters -CP '\\b\\w{3}\\b'" + ] # sample inputs for checking the outcomes of good inputs / test_basic_regex - self.good_input1 = "-RP '\\b\\d{3}\\b' -RPl threedigits" - self.good_input2 = "-RP 'TestCase' -RP 'page' -RPl testcases -RPl page_word" - self.good_input3 = "-CP 'Chevalier' -CPl chev_com -RP 'welcome to Wikipedia' -RPl wiki_welcome -CP 'Warning' -CPl warning" - self.good_input4 = "-CP 'WP:EVADE' -CPl wp_evade" + self.good_inputs_list = [ + "-RP '\\b\\d{3}\\b' -RPl threedigits", + "-RP 'TestCase' -RP 'page' -RPl testcases -RPl page_word", + "-CP 'Chevalier' -CPl chev_com -RP 'welcome to Wikipedia' -RPl wiki_welcome -CP 'Warning' -CPl warning", + "-CP 'WP:EVADE' -CPl wp_evade" + ] - self.good_inputs_list = [self.good_input1,self.good_input2,self.good_input3, self.good_input4] + + self.cap_inputs_list = [ + "-RP 'Li Chevalier' -RPl li_cheval -CP '(?P\\b[a-zA-Z]{3}\\b)|(?P\\b\\d+\\b)|(?P\\bcat\\b)' -CPl three", + "-CP '(?P\\bTestCaseA\\b)|(?P\\bTestCaseB\\b)|(?P\\bTestCaseC\\b)|(?P\\bTestCaseD\\b)' -CPl testcase -RP '(?Pnpov|NPOV)|(?Pneutral point of view)' -RPl npov" + ] - # and with capture group(s) / test_capturegroup_regex - self.cap_input1 = "-RP 'Li Chevalier' -RPl li_cheval -CP '(?P\\b[a-zA-Z]{3}\\b)|(?P\\b\\d+\\b)|(?P\\bcat\\b)' -CPl three" - self.cap_input2 = "-CP '(?P\\bTestCaseA\\b)|(?P\\bTestCaseB\\b)|(?P\\bTestCaseC\\b)|(?P\\bTestCaseD\\b)' -CPl testcase -RP '(?Pnpov|NPOV)|(?Pneutral point of view)' -RPl npov" - self.cap_inputs_list = [self.cap_input1,self.cap_input2] def test_regex_inputs(self): for input in self.bad_inputs_list: @@ -341,8 +347,7 @@ class Test_Regex(unittest.TestCase): self.assertNotEqual(proc.returncode,0) def test_basic_regex(self): - i = 1 - for input in self.good_inputs_list: + for i, input in enumerate(self.good_inputs_list): test_filename = "basic_{0}_{1}.tsv".format(self.wikiq_out_name[:-4], str(i)) #print(test_filename) @@ -356,22 +361,18 @@ class Test_Regex(unittest.TestCase): proc = subprocess.Popen(call,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True) proc.wait() - copyfile(self.call_output, test_file) - f = open(self.call_output, 'w') - f.close() - - # don't have a baseline file to compare a test to?? - # baseline_file = os.path.join(".", self.baseline_output_dir, test_filename) - i += 1 - #TODO - #a proper assert statement still needs to go here, but I checked out the generated files for now and it functions + test = pd.read_table(test_file) + + baseline_file = os.path.join(".", self.baseline_output_dir, test_filename) + baseline = pd.read_table(baseline_file) + assert_frame_equal(test, baseline) + print(i) def test_capturegroup_regex(self): - i = 1 - for input in self.cap_inputs_list: + for i, input in enumerate(self.cap_inputs_list): test_filename = "capturegroup_{0}_{1}.tsv".format(self.wikiq_out_name[:-4], str(i)) print(test_filename) test_file = os.path.join(self.test_output_dir, test_filename) @@ -386,15 +387,13 @@ class Test_Regex(unittest.TestCase): proc.wait() copyfile(self.call_output, test_file) - f = open(self.call_output, 'w') - f.close() - # don't have a baseline file to compare a test to?? - # baseline_file = os.path.join(".", self.baseline_output_dir, test_filename) - i += 1 + test = pd.read_table(test_file) + + baseline_file = os.path.join(".", self.baseline_output_dir, test_filename) + baseline = pd.read_table(baseline_file) + assert_frame_equal(test, baseline) - #TODO - #a proper assert statement still needs to go here, but I checked out the generated files for now and it functions if __name__ == '__main__': unittest.main() diff --git a/test/baseline_output/basic_regextest_0.tsv b/test/baseline_output/basic_regextest_0.tsv new file mode 100644 index 0000000..1b4daf8 --- /dev/null +++ b/test/baseline_output/basic_regextest_0.tsv @@ -0,0 +1,27 @@ +anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars threedigits title +FALSE 56237363 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 1141 126, 126, 126, 126 "User talk:86.139.142.254" +FALSE 56237364 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo 663 None "User talk:Kavin kavitha" +FALSE 56237365 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv 399 None "User talk:Dr.vivek163" +FALSE 56237366 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf 1260 None "User talk:Twistorl" +FALSE 56237368 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 2249 119, 978, 500, 292, 225, 199, 292 "Kom Firin" +FALSE 56237368 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh 2230 119, 978, 500, 292, 225, 199, 292 "Kom Firin" +FALSE 56237369 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 27840 798, 150, 150, 150, 621, 137, 137, 150, 150, 350, 195, 350, 195, 180, 180, 350, 195, 300, 150, 150, 150, 180, 180, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 27787 798, 150, 150, 150, 621, 137, 137, 150, 150, 350, 195, 350, 195, 180, 180, 350, 195, 300, 150, 150, 150, 180, 180, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj 27784 798, 150, 150, 150, 621, 137, 137, 150, 150, 350, 195, 350, 195, 180, 180, 350, 195, 300, 150, 150, 150, 180, 180, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h 27783 798, 150, 150, 150, 621, 137, 137, 150, 150, 350, 195, 350, 195, 180, 180, 350, 195, 300, 150, 150, 150, 180, 180, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg 27782 798, 150, 150, 150, 621, 137, 137, 150, 150, 350, 195, 350, 195, 180, 180, 350, 195, 300, 150, 150, 150, 180, 180, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 27757 798, 150, 150, 150, 621, 100, 621 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 27667 798, 150, 150, 150, 621, 100, 621 "User:Editingaccount1994/sandbox" +FALSE 56237370 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 25 None "Anita del Rey" +FALSE 56237371 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 1274 119, 157, 119, 157, 119, 157, 119, 157 "User talk:119.94.96.157" +FALSE 56237372 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr 113 None "Category:Ohmi Railway" +FALSE 56237375 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq 199 None "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg 1840 None "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 2949 126, 126, 126, 126 "User talk:92.226.219.222" +FALSE 56237376 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk 28 None "User:Dipayanacharya" +FALSE 56237376 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw 38 None "User:Dipayanacharya" +FALSE 56237378 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd 65 None "BSCIC" +FALSE 56237379 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n 285 None "Category:Women government ministers of Yemen" +FALSE 56237381 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 103 None "Talk:List of Morning Glories Characters" +FALSE 56237382 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi 1330 106, 207, 126, 114, 106, 207, 126, 114, 106, 207, 126, 114, 106, 207, 126, 114 "User talk:106.207.126.114" +FALSE 56237382 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe 2355 106, 207, 126, 114, 106, 207, 126, 114, 106, 207, 126, 114, 106, 207, 126, 114 "User talk:106.207.126.114" diff --git a/test/baseline_output/basic_regextest_1.tsv b/test/baseline_output/basic_regextest_1.tsv new file mode 100644 index 0000000..c0682f1 --- /dev/null +++ b/test/baseline_output/basic_regextest_1.tsv @@ -0,0 +1,27 @@ +anon articleid date_time deleted editor editor_id minor namespace page_word revert reverteds revid sha1 testcases text_chars title +FALSE 56237363 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 page, page FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 None 1141 "User talk:86.139.142.254" +FALSE 56237364 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 None FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo None 663 "User talk:Kavin kavitha" +FALSE 56237365 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 None FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv TestCase, TestCase 399 "User talk:Dr.vivek163" +FALSE 56237366 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 page FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf None 1260 "User talk:Twistorl" +FALSE 56237368 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 page FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 TestCase 2249 "Kom Firin" +FALSE 56237368 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 page FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh None 2230 "Kom Firin" +FALSE 56237369 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 page, page FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 None 27840 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 page, page FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 None 27787 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 page, page FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj None 27784 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 page, page FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h None 27783 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 page, page FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg None 27782 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 page, page FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 None 27757 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 page, page FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 None 27667 "User:Editingaccount1994/sandbox" +FALSE 56237370 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 None FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 None 25 "Anita del Rey" +FALSE 56237371 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 page FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 None 1274 "User talk:119.94.96.157" +FALSE 56237372 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 None FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr None 113 "Category:Ohmi Railway" +FALSE 56237375 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 None FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq None 199 "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 page, page, page, page FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg None 1840 "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 page, page, page, page, page, page FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 None 2949 "User talk:92.226.219.222" +FALSE 56237376 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 None FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk None 28 "User:Dipayanacharya" +FALSE 56237376 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 None FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw None 38 "User:Dipayanacharya" +FALSE 56237378 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 None FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd None 65 "BSCIC" +FALSE 56237379 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 None FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n None 285 "Category:Women government ministers of Yemen" +FALSE 56237381 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 None FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 None 103 "Talk:List of Morning Glories Characters" +FALSE 56237382 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 page FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi None 1330 "User talk:106.207.126.114" +FALSE 56237382 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 page FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe None 2355 "User talk:106.207.126.114" diff --git a/test/baseline_output/basic_regextest_2.tsv b/test/baseline_output/basic_regextest_2.tsv new file mode 100644 index 0000000..059691d --- /dev/null +++ b/test/baseline_output/basic_regextest_2.tsv @@ -0,0 +1,27 @@ +anon articleid chev_com date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title warning wiki_welcome +FALSE 56237363 None 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 1141 "User talk:86.139.142.254" None None +FALSE 56237364 None 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo 663 "User talk:Kavin kavitha" None None +FALSE 56237365 None 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv 399 "User talk:Dr.vivek163" None None +FALSE 56237366 None 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf 1260 "User talk:Twistorl" Warning welcome to Wikipedia +FALSE 56237368 None 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 2249 "Kom Firin" None None +FALSE 56237368 None 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh 2230 "Kom Firin" None None +FALSE 56237369 Chevalier, Chevalier 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 27840 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 27787 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj 27784 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h 27783 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg 27782 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 27757 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 Chevalier, Chevalier 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 27667 "User:Editingaccount1994/sandbox" None None +FALSE 56237370 None 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 25 "Anita del Rey" None None +FALSE 56237371 None 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 1274 "User talk:119.94.96.157" Warning welcome to Wikipedia +FALSE 56237372 None 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr 113 "Category:Ohmi Railway" None None +FALSE 56237375 None 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq 199 "User talk:92.226.219.222" None None +FALSE 56237375 None 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg 1840 "User talk:92.226.219.222" None None +FALSE 56237375 None 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 2949 "User talk:92.226.219.222" None None +FALSE 56237376 None 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk 28 "User:Dipayanacharya" None None +FALSE 56237376 None 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw 38 "User:Dipayanacharya" None None +FALSE 56237378 None 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd 65 "BSCIC" None None +FALSE 56237379 None 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n 285 "Category:Women government ministers of Yemen" None None +FALSE 56237381 None 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 103 "Talk:List of Morning Glories Characters" None None +FALSE 56237382 None 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi 1330 "User talk:106.207.126.114" Warning welcome to Wikipedia +FALSE 56237382 None 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe 2355 "User talk:106.207.126.114" None welcome to Wikipedia diff --git a/test/baseline_output/basic_regextest_3.tsv b/test/baseline_output/basic_regextest_3.tsv new file mode 100644 index 0000000..15c3c64 --- /dev/null +++ b/test/baseline_output/basic_regextest_3.tsv @@ -0,0 +1,27 @@ +anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title wp_evade +FALSE 56237363 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 1141 "User talk:86.139.142.254" WP:EVADE +FALSE 56237364 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo 663 "User talk:Kavin kavitha" None +FALSE 56237365 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv 399 "User talk:Dr.vivek163" None +FALSE 56237366 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf 1260 "User talk:Twistorl" None +FALSE 56237368 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 2249 "Kom Firin" None +FALSE 56237368 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh 2230 "Kom Firin" None +FALSE 56237369 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 27840 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 27787 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj 27784 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h 27783 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg 27782 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 27757 "User:Editingaccount1994/sandbox" None +FALSE 56237369 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 27667 "User:Editingaccount1994/sandbox" None +FALSE 56237370 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 25 "Anita del Rey" None +FALSE 56237371 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 1274 "User talk:119.94.96.157" None +FALSE 56237372 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr 113 "Category:Ohmi Railway" None +FALSE 56237375 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq 199 "User talk:92.226.219.222" None +FALSE 56237375 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg 1840 "User talk:92.226.219.222" None +FALSE 56237375 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 2949 "User talk:92.226.219.222" WP:EVADE +FALSE 56237376 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk 28 "User:Dipayanacharya" None +FALSE 56237376 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw 38 "User:Dipayanacharya" None +FALSE 56237378 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd 65 "BSCIC" None +FALSE 56237379 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n 285 "Category:Women government ministers of Yemen" None +FALSE 56237381 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 103 "Talk:List of Morning Glories Characters" None +FALSE 56237382 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi 1330 "User talk:106.207.126.114" None +FALSE 56237382 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe 2355 "User talk:106.207.126.114" None diff --git a/test/baseline_output/capturegroup_regextest_0.tsv b/test/baseline_output/capturegroup_regextest_0.tsv new file mode 100644 index 0000000..f720710 --- /dev/null +++ b/test/baseline_output/capturegroup_regextest_0.tsv @@ -0,0 +1,27 @@ +anon articleid date_time deleted editor editor_id li_cheval minor namespace revert reverteds revid sha1 text_chars three_cat three_letter three_number title +FALSE 56237363 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 None FALSE 3 FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 1141 None has, has None "User talk:86.139.142.254" +FALSE 56237364 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 None FALSE 3 FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo 663 None AES, for 01, 12, 2001 "User talk:Kavin kavitha" +FALSE 56237365 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 None FALSE 3 FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv 399 None new None "User talk:Dr.vivek163" +FALSE 56237366 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 None FALSE 3 FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf 1260 None None 1 "User talk:Twistorl" +FALSE 56237368 2018-01-07 10:41:51 FALSE "Khruner" 8409334 None FALSE 0 FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 2249 None AES, jpg, the, the, the, the, and, you, Tor 67, 119 "Kom Firin" +FALSE 56237368 2018-01-27 12:16:02 FALSE "Khruner" 8409334 None TRUE 0 FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh 2230 None None None "Kom Firin" +FALSE 56237369 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier FALSE 2 FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 27840 None AES, nom None "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier TRUE 2 FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 27787 None web, See, for None "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier TRUE 2 FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj 27784 None per, TFD, TFD None "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier TRUE 2 FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h 27783 None per, for, Log, TFD 2010, 13 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier TRUE 2 FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg 27782 None per, for, Log, TFD 2011, 17 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier FALSE 2 FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 27757 None you, are, tor, you None "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier, Li Chevalier FALSE 2 FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 27667 None jpg, jpg, has, COM 16, 2018 "User:Editingaccount1994/sandbox" +FALSE 56237370 2018-01-07 10:42:20 FALSE "PamD" 1368779 None FALSE 0 FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 25 None alt None "Anita del Rey" +FALSE 56237371 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 None FALSE 3 FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 1274 None None 119, 94, 96, 157, 119, 94, 96, 157, 1 "User talk:119.94.96.157" +FALSE 56237372 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 None FALSE 14 FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr 113 None AES None "Category:Ohmi Railway" +FALSE 56237375 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 None FALSE 3 FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq 199 None AES None "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 None TRUE 3 FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg 1840 None See, for None "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 14:33:36 FALSE "Only" 702940 None FALSE 3 FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 2949 None has, has None "User talk:92.226.219.222" +FALSE 56237376 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 None FALSE 2 FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk 28 None None None "User:Dipayanacharya" +FALSE 56237376 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 None FALSE 2 FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw 38 None None None "User:Dipayanacharya" +FALSE 56237378 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 None FALSE 0 FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd 65 None AES, and None "BSCIC" +FALSE 56237379 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 None FALSE 14 FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n 285 None AES, Non None "Category:Women government ministers of Yemen" +FALSE 56237381 2018-01-07 10:45:54 FALSE "PRehse" 410898 None FALSE 1 FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 103 None AES, low, low None "Talk:List of Morning Glories Characters" +FALSE 56237382 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 None FALSE 3 FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi 1330 None None 106, 207, 126, 114, 106, 207, 126, 114, 1 "User talk:106.207.126.114" +FALSE 56237382 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 None FALSE 3 FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe 2355 None None None "User talk:106.207.126.114" diff --git a/test/baseline_output/capturegroup_regextest_1.tsv b/test/baseline_output/capturegroup_regextest_1.tsv new file mode 100644 index 0000000..2645cc3 --- /dev/null +++ b/test/baseline_output/capturegroup_regextest_1.tsv @@ -0,0 +1,27 @@ +anon articleid date_time deleted editor editor_id minor namespace npov_neutral npov_npov revert reverteds revid sha1 testcase_a testcase_b testcase_c testcase_d text_chars title +FALSE 56237363 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 None None FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 None None None None 1141 "User talk:86.139.142.254" +FALSE 56237364 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 None None FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo None None None None 663 "User talk:Kavin kavitha" +FALSE 56237365 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 None NPOV, NPOV FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv None None None None 399 "User talk:Dr.vivek163" +FALSE 56237366 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 None None FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf None None None None 1260 "User talk:Twistorl" +FALSE 56237368 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 None NPOV FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 None TestCaseB None None 2249 "Kom Firin" +FALSE 56237368 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 None None FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh None None None None 2230 "Kom Firin" +FALSE 56237369 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 None None FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 None None None None 27840 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 None None FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 None None None None 27787 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 None None FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj None None None None 27784 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 None None FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h None None None None 27783 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 None None FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg None None None None 27782 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 None None FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 None None None TestCaseD 27757 "User:Editingaccount1994/sandbox" +FALSE 56237369 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 None None FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 None None None None 27667 "User:Editingaccount1994/sandbox" +FALSE 56237370 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 None None FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 None None None None 25 "Anita del Rey" +FALSE 56237371 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 None None FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 None None None None 1274 "User talk:119.94.96.157" +FALSE 56237372 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 None None FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr None None None None 113 "Category:Ohmi Railway" +FALSE 56237375 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 None None FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq None None None None 199 "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 None None FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg None None None None 1840 "User talk:92.226.219.222" +FALSE 56237375 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 None None FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 None None None None 2949 "User talk:92.226.219.222" +FALSE 56237376 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 None None FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk None None None None 28 "User:Dipayanacharya" +FALSE 56237376 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 None None FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw None None None None 38 "User:Dipayanacharya" +FALSE 56237378 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 None None FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd None None None None 65 "BSCIC" +FALSE 56237379 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 None None FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n None None None None 285 "Category:Women government ministers of Yemen" +FALSE 56237381 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 None None FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 None None None None 103 "Talk:List of Morning Glories Characters" +FALSE 56237382 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 None None FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi None None None None 1330 "User talk:106.207.126.114" +FALSE 56237382 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 None None FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe None None None None 2355 "User talk:106.207.126.114" diff --git a/test/baseline_output/regextest.tsv b/test/baseline_output/regextest.tsv new file mode 100644 index 0000000..059691d --- /dev/null +++ b/test/baseline_output/regextest.tsv @@ -0,0 +1,27 @@ +anon articleid chev_com date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title warning wiki_welcome +FALSE 56237363 None 2018-01-07 10:40:58 FALSE "NinjaRobotPirate" 3742946 FALSE 3 FALSE 819091731 135nz8q6lfam6cojla7azb7k5alx3t3 1141 "User talk:86.139.142.254" None None +FALSE 56237364 None 2018-01-07 10:41:10 FALSE "Kavin kavitha" 32792125 FALSE 3 FALSE 819091755 0pwezjc6yopz0smc8al6ogc4fax5bwo 663 "User talk:Kavin kavitha" None None +FALSE 56237365 None 2018-01-07 10:41:26 FALSE "Amicable always" 32621254 FALSE 3 FALSE 819091788 sz3t2ap7z8bpkdvdvi195f3i35949bv 399 "User talk:Dr.vivek163" None None +FALSE 56237366 None 2018-01-07 10:41:31 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091796 r6s5j8j3iykenrhuhpnkpsmmd71vubf 1260 "User talk:Twistorl" Warning welcome to Wikipedia +FALSE 56237368 None 2018-01-07 10:41:51 FALSE "Khruner" 8409334 FALSE 0 FALSE 819091825 tf5qz2yaswx61zrlm9ovxzuhl7r2dc4 2249 "Kom Firin" None None +FALSE 56237368 None 2018-01-27 12:16:02 FALSE "Khruner" 8409334 TRUE 0 FALSE 822610647 e6oa4g0qv64icdaq26uu1zzbyr5hcbh 2230 "Kom Firin" None None +FALSE 56237369 Chevalier, Chevalier 2018-01-07 10:42:05 FALSE "Editingaccount1994" 32794215 FALSE 2 FALSE 819091844 0fyvyh2a8xu41gt8obr34oba0bfixj6 27840 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-07 11:09:52 FALSE "AnomieBOT" 7611264 TRUE 2 FALSE 819093984 8gy52aolt5rg3eaketwj5v7eiw0apv2 27787 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 21:45:50 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820064189 he8ydemaanxlrpftqxkez8jfpge1fsj 27784 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 23:28:11 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078679 0to17w9rth3url8n7gvucdtobybdq5h 27783 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-12 23:28:39 FALSE "SporkBot" 12406635 TRUE 2 FALSE 820078733 531dizmmloyxffbkdr5vph7owh921eg 27782 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 None 2018-01-13 13:45:33 FALSE "Frietjes" 13791031 FALSE 2 FALSE 820177382 nik9p2u2fuk4yazjxt8ymbicxv5qid9 27757 "User:Editingaccount1994/sandbox" None None +FALSE 56237369 Chevalier, Chevalier 2018-01-24 01:35:22 FALSE "CommonsDelinker" 2304267 FALSE 2 FALSE 822038928 gwk6pampl8si1v5pv3kwgteg710sfw3 27667 "User:Editingaccount1994/sandbox" None None +FALSE 56237370 None 2018-01-07 10:42:20 FALSE "PamD" 1368779 FALSE 0 FALSE 819091874 n4ozbsgle13p9yywtfrz982ccj8woc9 25 "Anita del Rey" None None +FALSE 56237371 None 2018-01-07 10:42:27 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819091883 ksohnvsbeuzwpl5vb8a3v8m18hva0a7 1274 "User talk:119.94.96.157" Warning welcome to Wikipedia +FALSE 56237372 None 2018-01-07 10:42:50 FALSE "Underbar dk" 677153 FALSE 14 FALSE 819091914 je7aw21fedbwyqsyofpisdrynsu7olr 113 "Category:Ohmi Railway" None None +FALSE 56237375 None 2018-01-07 10:43:32 FALSE "TastyPoutine" 882433 FALSE 3 FALSE 819091968 cpm4tkzcx4hc6irr9ukbi06ogud8dtq 199 "User talk:92.226.219.222" None None +FALSE 56237375 None 2018-01-07 11:10:24 FALSE "AnomieBOT" 7611264 TRUE 3 FALSE 819094036 artmfz8b2gxhb3pp8a5p4ksplxqfkpg 1840 "User talk:92.226.219.222" None None +FALSE 56237375 None 2018-01-07 14:33:36 FALSE "Only" 702940 FALSE 3 FALSE 819112363 dn9wj0n8d8pdd5lqe56uw5xamupowr1 2949 "User talk:92.226.219.222" None None +FALSE 56237376 None 2018-01-07 10:44:01 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092004 ofueugwatmmn7u73isw732neuza57gk 28 "User:Dipayanacharya" None None +FALSE 56237376 None 2018-01-07 10:49:08 FALSE "Dipayanacharya" 32794237 FALSE 2 FALSE 819092390 dsz55xv96ec2uv6w9c1z7c52ipfovbw 38 "User:Dipayanacharya" None None +FALSE 56237378 None 2018-01-07 10:44:56 FALSE "Vinegarymass911" 21516552 FALSE 0 FALSE 819092066 9ma38hak0ef1ew4fpiutxpnzd8oz1wd 65 "BSCIC" None None +FALSE 56237379 None 2018-01-07 10:45:21 FALSE "BrownHairedGirl" 754619 FALSE 14 FALSE 819092102 4dvakoat58bzyf5hmtthxukt29hip6n 285 "Category:Women government ministers of Yemen" None None +FALSE 56237381 None 2018-01-07 10:45:54 FALSE "PRehse" 410898 FALSE 1 FALSE 819092135 2sjrxsc7os9k9pg4su2t4rk2j8nn0h7 103 "Talk:List of Morning Glories Characters" None None +FALSE 56237382 None 2018-01-07 10:45:56 FALSE "ClueBot NG" 13286072 FALSE 3 FALSE 819092138 3y9t5wpk6ur5jhone75rhm4wjf01fgi 1330 "User talk:106.207.126.114" Warning welcome to Wikipedia +FALSE 56237382 None 2018-01-07 10:50:22 FALSE "HindWIKI" 31190506 FALSE 3 FALSE 819092495 8wvn6vh3isyt0dorpe89lztrburgupe 2355 "User talk:106.207.126.114" None welcome to Wikipedia diff --git a/wikiq b/wikiq index 7a1b846..6a1ada5 100755 --- a/wikiq +++ b/wikiq @@ -80,7 +80,7 @@ def matchmake(scanned_content, rev_data, regex, label): temp_dict[label] = None # update rev_data with our new columns rev_data.update(temp_dict) - print(rev_data.keys()) +# print(rev_data.keys()) return rev_data @@ -243,7 +243,7 @@ class WikiqParser(): if namespace not in self.namespace_filter: continue - print(self.revert_radius) +# print(self.revert_radius) rev_detector = mwreverts.Detector(radius = self.revert_radius)