diff --git a/Bioresponse/label.json b/Bioresponse/label.json deleted file mode 100644 index 6004bd8bcdcbb9250c56d3b37316c75f8ad1ff7d..0000000000000000000000000000000000000000 --- a/Bioresponse/label.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2faf7e495bfc38eecea5d668ff0dee281d7fa4a672416986539a97400dc9ae40 -size 24 diff --git a/Bioresponse/rules.json b/Bioresponse/rules.json deleted file mode 100644 index 73e7cf683799b057c2244ea87f0fd996ee9d3871..0000000000000000000000000000000000000000 --- a/Bioresponse/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e2535a290e315ccc4d33b61657a3d127015bfa631507697b61d272e15b11d9f -size 12127 diff --git a/Bioresponse/test.json b/Bioresponse/test.json deleted file mode 100644 index e187c8400a7b03b13fce09c484b9d7e3a47761f9..0000000000000000000000000000000000000000 --- a/Bioresponse/test.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39f4c27b3ec82c3aba6380d2c2cc3e5d19bdded35332c96ace622ae094792356 -size 3739085 diff --git a/Bioresponse/train.json b/Bioresponse/train.json deleted file mode 100644 index 1db7b15ad1cdf9c3249cd29e8191f58689eb161c..0000000000000000000000000000000000000000 --- a/Bioresponse/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c597e58013825c4cf6f83cd9c0126decd5c99d791561dddcb9498d428092ae6 -size 29881496 diff --git a/Bioresponse/valid.json b/Bioresponse/valid.json deleted file mode 100644 index ac6a7eee0fcfdc8bb1725202a876d643068d1c9b..0000000000000000000000000000000000000000 --- a/Bioresponse/valid.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e6b0adf12724a8c9212cc306cd4c5ec7d0a9137684ccd426d29ebe376de6a02 -size 3735356 diff --git a/PhishingWebsites/label.json b/PhishingWebsites/label.json deleted file mode 100644 index 6d94b978409ccb3ddb275b5a5587768bfbf39b84..0000000000000000000000000000000000000000 --- a/PhishingWebsites/label.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:403571d3200240e03891ce786ab4d9b38ea679847255424682f5e9e24610b64e -size 25 diff --git a/PhishingWebsites/rules.json b/PhishingWebsites/rules.json deleted file mode 100644 index 9555ea69d73a977a71b352350a4db688db778cab..0000000000000000000000000000000000000000 --- a/PhishingWebsites/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5152408d87e86a39a905b7e348b363a055be82dfb81cab995eb742e995623ec4 -size 9428 diff --git a/PhishingWebsites/test.json b/PhishingWebsites/test.json deleted file mode 100644 index 0ff96a87cadcdfe19fd69b4671ed828da21911c0..0000000000000000000000000000000000000000 --- a/PhishingWebsites/test.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3410f3625ffc2ea6bf08d5c33d2bcd9db486312d0fcf0655702ede6cc913051f -size 231431 diff --git a/PhishingWebsites/train.json b/PhishingWebsites/train.json deleted file mode 100644 index 06fa72fa6f70a6a9beed9c54dfca430d6d353a0c..0000000000000000000000000000000000000000 --- a/PhishingWebsites/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25d42c4d2dc63a221deb3d1a7ccf42471924ab0873c6ba494ad6b877ab718898 -size 1858071 diff --git a/PhishingWebsites/valid.json b/PhishingWebsites/valid.json deleted file mode 100644 index 82fc0000716f07d688cd3218d80589a299a0a959..0000000000000000000000000000000000000000 --- a/PhishingWebsites/valid.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ef17933fc5cac3ab6b5773249600e8e50f3c9b9e9826f5ffcc3d9279ad60d1e -size 231168 diff --git a/agnews/readme.txt b/agnews/readme.txt index dea2c617eec1aa16ea37ad26427341809c2bf3d6..8f1788506cdae294e2434e55fe35140e5257284e 100644 --- a/agnews/readme.txt +++ b/agnews/readme.txt @@ -1,87 +1,87 @@ -Agnews Topic classification dataset - -https://github.com/weakrules/Denoise-multi-weak-sources/blob/master/rules-noisy-labels/Agnews/angews_rule.py - - -# Labels -"0": "World", -"1": "Sports", -"2": "Business", -"3": "Sci/Tech" - - - - - - - -# Labeling functions (all 9 lf are keyword lf) - -## LF1 0: world - -r1 = ["atomic", "captives", "baghdad", "israeli", "iraqis", "iranian", "afghanistan", "wounding", "terrorism", "soldiers", \ -"palestinians", "palestinian", "policemen", "iraqi", "terrorist", 'north korea', 'korea', \ -'israel', 'u.n.', 'egypt', 'iran', 'iraq', 'nato', 'armed', 'peace'] - - -## LF2 0: world - -r2= [' war ', 'prime minister', 'president', 'commander', 'minister', 'annan', "military", "militant", "kill", 'operator'] - - - - -## LF3 1: sports - -r3 = ["goals", "bledsoe", "coaches", "touchdowns", "kansas", "rankings", "no.", \ - "champ", "cricketers", "hockey", "champions", "quarterback", 'club', 'team', 'baseball', 'basketball', 'soccer', 'football', 'boxing', 'swimming', \ - 'world cup', 'nba',"olympics","final", "finals", 'fifa', 'racist', 'racism'] - - - -## LF4 1: sports - -r4 = ['athlete', 'striker', 'defender', 'goalkeeper', 'midfielder', 'shooting guard', 'power forward', 'point guard', 'pitcher', 'catcher', 'first base', 'second base', 'third base','shortstop','fielder'] - - - - -## LF5 1: sports - -r5=['lakers','chelsea', 'piston','cavaliers', 'rockets', 'clippers','ronaldo', \ - 'celtics', 'hawks','76ers', 'raptors', 'pacers', 'suns', 'warriors','blazers','knicks','timberwolves', 'hornets', 'wizards', 'nuggets', 'mavericks', 'grizzlies', 'spurs', \ - 'cowboys', 'redskins', 'falcons', 'panthers', 'eagles', 'saints', 'buccaneers', '49ers', 'cardinals', 'texans', 'seahawks', 'vikings', 'patriots', 'colts', 'jaguars', 'raiders', 'chargers', 'bengals', 'steelers', 'browns', \ - 'braves','marlins','mets','phillies','cubs','brewers','cardinals', 'diamondbacks','rockies', 'dodgers', 'padres', 'orioles', 'sox', 'yankees', 'jays', 'sox', 'indians', 'tigers', 'royals', 'twins','astros', 'angels', 'athletics', 'mariners', 'rangers', \ - 'arsenal', 'burnley', 'newcastle', 'leicester', 'manchester united', 'everton', 'southampton', 'hotspur','tottenham', 'fulham', 'watford', 'sheffield','crystal palace', 'derby', 'charlton', 'aston villa', 'blackburn', 'west ham', 'birmingham city', 'middlesbrough', \ - 'real madrid', 'barcelona', 'villarreal', 'valencia', 'betis', 'espanyol','levante', 'sevilla', 'juventus', 'inter milan', 'ac milan', 'as roma', 'benfica', 'porto', 'getafe', 'bayern', 'schalke', 'bremen', 'lyon', 'paris saint', 'monaco', 'dynamo'] - - - - -## LF6 3: tech - -r6 = ["technology", "engineering", "science", "research", "cpu", "windows", "unix", "system", 'computing', 'compute']#, "wireless","chip", "pc", ] - - - - -## LF7 3: tech - -r7= ["google", "apple", "microsoft", "nasa", "yahoo", "intel", "dell", \ - 'huawei',"ibm", "siemens", "nokia", "samsung", 'panasonic', \ - 't-mobile', 'nvidia', 'adobe', 'salesforce', 'linkedin', 'silicon', 'wiki' -] - - - - -## LF8 - 2:business - -r8= ["stock", "account", "financ", "goods", "retail", 'economy', 'chairman', 'bank', 'deposit', 'economic', 'dow jones', 'index', '$', 'percent', 'interest rate', 'growth', 'profit', 'tax', 'loan', 'credit', 'invest'] - - - - -## LF9 - 2:business - +Agnews Topic classification dataset + +https://github.com/weakrules/Denoise-multi-weak-sources/blob/master/rules-noisy-labels/Agnews/angews_rule.py + + +# Labels +"0": "World", +"1": "Sports", +"2": "Business", +"3": "Sci/Tech" + + + + + + + +# Labeling functions (all 9 lf are keyword lf) + +## LF1 0: world + +r1 = ["atomic", "captives", "baghdad", "israeli", "iraqis", "iranian", "afghanistan", "wounding", "terrorism", "soldiers", \ +"palestinians", "palestinian", "policemen", "iraqi", "terrorist", 'north korea', 'korea', \ +'israel', 'u.n.', 'egypt', 'iran', 'iraq', 'nato', 'armed', 'peace'] + + +## LF2 0: world + +r2= [' war ', 'prime minister', 'president', 'commander', 'minister', 'annan', "military", "militant", "kill", 'operator'] + + + + +## LF3 1: sports + +r3 = ["goals", "bledsoe", "coaches", "touchdowns", "kansas", "rankings", "no.", \ + "champ", "cricketers", "hockey", "champions", "quarterback", 'club', 'team', 'baseball', 'basketball', 'soccer', 'football', 'boxing', 'swimming', \ + 'world cup', 'nba',"olympics","final", "finals", 'fifa', 'racist', 'racism'] + + + +## LF4 1: sports + +r4 = ['athlete', 'striker', 'defender', 'goalkeeper', 'midfielder', 'shooting guard', 'power forward', 'point guard', 'pitcher', 'catcher', 'first base', 'second base', 'third base','shortstop','fielder'] + + + + +## LF5 1: sports + +r5=['lakers','chelsea', 'piston','cavaliers', 'rockets', 'clippers','ronaldo', \ + 'celtics', 'hawks','76ers', 'raptors', 'pacers', 'suns', 'warriors','blazers','knicks','timberwolves', 'hornets', 'wizards', 'nuggets', 'mavericks', 'grizzlies', 'spurs', \ + 'cowboys', 'redskins', 'falcons', 'panthers', 'eagles', 'saints', 'buccaneers', '49ers', 'cardinals', 'texans', 'seahawks', 'vikings', 'patriots', 'colts', 'jaguars', 'raiders', 'chargers', 'bengals', 'steelers', 'browns', \ + 'braves','marlins','mets','phillies','cubs','brewers','cardinals', 'diamondbacks','rockies', 'dodgers', 'padres', 'orioles', 'sox', 'yankees', 'jays', 'sox', 'indians', 'tigers', 'royals', 'twins','astros', 'angels', 'athletics', 'mariners', 'rangers', \ + 'arsenal', 'burnley', 'newcastle', 'leicester', 'manchester united', 'everton', 'southampton', 'hotspur','tottenham', 'fulham', 'watford', 'sheffield','crystal palace', 'derby', 'charlton', 'aston villa', 'blackburn', 'west ham', 'birmingham city', 'middlesbrough', \ + 'real madrid', 'barcelona', 'villarreal', 'valencia', 'betis', 'espanyol','levante', 'sevilla', 'juventus', 'inter milan', 'ac milan', 'as roma', 'benfica', 'porto', 'getafe', 'bayern', 'schalke', 'bremen', 'lyon', 'paris saint', 'monaco', 'dynamo'] + + + + +## LF6 3: tech + +r6 = ["technology", "engineering", "science", "research", "cpu", "windows", "unix", "system", 'computing', 'compute']#, "wireless","chip", "pc", ] + + + + +## LF7 3: tech + +r7= ["google", "apple", "microsoft", "nasa", "yahoo", "intel", "dell", \ + 'huawei',"ibm", "siemens", "nokia", "samsung", 'panasonic', \ + 't-mobile', 'nvidia', 'adobe', 'salesforce', 'linkedin', 'silicon', 'wiki' +] + + + + +## LF8 - 2:business + +r8= ["stock", "account", "financ", "goods", "retail", 'economy', 'chairman', 'bank', 'deposit', 'economic', 'dow jones', 'index', '$', 'percent', 'interest rate', 'growth', 'profit', 'tax', 'loan', 'credit', 'invest'] + + + + +## LF9 - 2:business + r9= ["delta", "cola", "toyota", "costco", "gucci", 'citibank', 'airlines'] \ No newline at end of file diff --git a/agnews/test.json b/agnews/test.json index a2047f73d0ffd2a997b48729d05ac55077cf3a8c..a29ce989e819cafba1fc99847224edbfd2e4e192 100644 --- a/agnews/test.json +++ b/agnews/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f25140fee5149b14c4ec9ad6981acb7357d552f282ace1478bff536b6ddcac08 -size 3495507 +oid sha256:6b269a338214de9b3827d3056a9ae87c97679efe8a052efeb02b0925a62920eb +size 5571507 diff --git a/agnews/train.json b/agnews/train.json index a5918bb41071ef4fbd3ababfb2ab7ba5b4f33813..ab7b6a206a261901a150372fb33043194d0e8730 100644 --- a/agnews/train.json +++ b/agnews/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6aa806387c07ad0ee53d3ecebcc47dc0c22c2961cd34e248656d32441ba079a3 -size 28043077 +oid sha256:0f8c691e32d36ba1aad6257e67272040f3d83fdac272d7ac4ac7a9dfd3050d7c +size 44651077 diff --git a/agnews/valid.json b/agnews/valid.json index c25573e16497180370582db3e0e03325c153f65d..b73e2abe69b7ba9ee572e938762ca2e00aa448b5 100644 --- a/agnews/valid.json +++ b/agnews/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b063b0eb549603a6db17e9f84e4695dd65bff3764f8af2404c12519aaef177e7 -size 3458430 +oid sha256:a58afcd585ce5f5be160a9c4d43fb5873f2ffaaaae932a5901674b5297e342a9 +size 5534430 diff --git a/bank-marketing/label.json b/bank-marketing/label.json deleted file mode 100644 index 3f9533aedf14758c126a0331a0b4f839fe58cd73..0000000000000000000000000000000000000000 --- a/bank-marketing/label.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3076495f06f7531a7c9335d92d53d85e262656bbf2087e2408189f4e28b05852 -size 24 diff --git a/bank-marketing/rules.json b/bank-marketing/rules.json deleted file mode 100644 index b8d59f1f600a86c6b84780f78cd96df8b1a82746..0000000000000000000000000000000000000000 --- a/bank-marketing/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc7b243ae6ecb6142afc28dfdee3b599ccffeb5ad930f092e16968c8c9c14385 -size 11930 diff --git a/bank-marketing/test.json b/bank-marketing/test.json deleted file mode 100644 index 962c6a76307b56acbadee16eee4f028efb5ea281..0000000000000000000000000000000000000000 --- a/bank-marketing/test.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f43dd1db6c0c9a34b27ca436265ca958f2495cc54c82a243c0c8c5e593545e0 -size 1030431 diff --git a/bank-marketing/train.json b/bank-marketing/train.json deleted file mode 100644 index ce038168859a23d385fb3175ba42159e4da84ee4..0000000000000000000000000000000000000000 --- a/bank-marketing/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ebcbb66a468bed1f8c62a699933755f6584aae865601af121ec7f6111fdd0987 -size 8276030 diff --git a/bank-marketing/valid.json b/bank-marketing/valid.json deleted file mode 100644 index f414765d1c714c66ca44f92d82cc1cf6429aa38a..0000000000000000000000000000000000000000 --- a/bank-marketing/valid.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:791340aaa6fb44680990cea55bebb503fec2ce7018d170995027ee0dd1142022 -size 1030349 diff --git a/basketball/readme.txt b/basketball/readme.txt index de0b5ac957ff4ef7add7dbc54c7a86fc7de63531..85c3ed2febe4579e1e8e3a4be954deb013e54456 100644 --- a/basketball/readme.txt +++ b/basketball/readme.txt @@ -1,18 +1,18 @@ -Basketball - A Video Dataset for Activity Recognition in the Basketball Game - -# Source: - -D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. - - -# Labels: - -0: negative (the game is not basketball) - -1: positive (the game is basketball) - - - -4 Labeling functions - +Basketball - A Video Dataset for Activity Recognition in the Basketball Game + +# Source: + +D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. + + +# Labels: + +0: negative (the game is not basketball) + +1: positive (the game is basketball) + + + +4 Labeling functions + LFs: these sources rely on an off-the-shelf object detector to detect balls or people, and use heuristics based on the average pixel of the detected ball or distance between the ball and person to determine whether the sport being played is basketball or not. \ No newline at end of file diff --git a/basketball/test.json b/basketball/test.json index e15c6506aed50d786957821bdd1f16cf8a5426fe..0ba35e2f64b22a526fc31606e58f5857b6b56d49 100644 --- a/basketball/test.json +++ b/basketball/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef43d2a39e7d08de16b0c95cbeeef9f10e59600c3e7e1d2a2f6c36be974bc685 -size 52411265 +oid sha256:b1a460aa8a3de9bfc7e36986c31546c4bcd6fa341716d3e1ae98e4ff820acb34 +size 52410041 diff --git a/basketball/train.json b/basketball/train.json index 6dc557ab4e4539bc470f51c363de30b5403a9609..3c81d4d7b75e6aaf65d92a9261b219e50d9c8988 100644 --- a/basketball/train.json +++ b/basketball/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af2bf8f5d7fc78a50edbf8ad16fc18aa86ba5f8d57467cffe5c43b90f4920683 -size 771265380 +oid sha256:4d3fdf3186fee1430ce7ccf9f3020e7e7a51242ade6f97b9b9c27056b7d9af45 +size 771247408 diff --git a/basketball/valid.json b/basketball/valid.json index 1e9e105b4bbbdc70764536d0409b76f4450652d7..8c6163797fd99e7d17a0e31809541d743187262d 100644 --- a/basketball/valid.json +++ b/basketball/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84cd4595908e00030bd6132269c6f10e5d1ee9f118c48b4e7150f91bfb18bc36 -size 45661535 +oid sha256:87df5c70192b6ab0c28e9a97c283a20cf8483aefaf9a2b8b237e4abb572c8dff +size 45660469 diff --git a/bc5cdr/test.json b/bc5cdr/test.json index 45e3aeca14f2da60590ddf5310090a2c5966409c..36ed56cfcf0001d754aeb06cf981a73f71e707d4 100644 --- a/bc5cdr/test.json +++ b/bc5cdr/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2dece28e0521415d6c99eb02264b631853e7f93e55a748b6e665e160ec6584b9 -size 7178624 +oid sha256:ba73806d670943235fabddb8551854559ce429f5b00d0dea48d9a939b753daf6 +size 18436624 diff --git a/bc5cdr/train.json b/bc5cdr/train.json index 584e619ec059c963474db0f1314f94bbfb24a28c..f488ea68dc0ef5dc6004f29d518757d1c9c84c40 100644 --- a/bc5cdr/train.json +++ b/bc5cdr/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:895a9fd6199c27e9afad367ed1f11b3274609bbb535ead1edfab2e7a1c20aa36 -size 6902816 +oid sha256:a1de64778f41b861f01568325f7aff66c4d18155bf112d46b3fd4103bd6730d1 +size 17677316 diff --git a/bc5cdr/valid.json b/bc5cdr/valid.json index 505c42eaae3389ae5315a5ca63d1c8bbf4eedae4..82e52861bf89a356bc19ba13cd180344cfdb2342 100644 --- a/bc5cdr/valid.json +++ b/bc5cdr/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:525356a90f1be3111101f398c67a09db0d82501fe8d23262eaae877d207ebfdf -size 6839398 +oid sha256:4c3b537ca3fb51c52380304743381dc3219fa77c5d7a8886a5c9a637218903a9 +size 17537198 diff --git a/cdr/readme.txt b/cdr/readme.txt index bbe0e548ccb91340d9e773d9c7687ef44cbc060a..541142e76debbee2a11c5ff42be007aedd0df925 100644 --- a/cdr/readme.txt +++ b/cdr/readme.txt @@ -1,286 +1,286 @@ -CDR - Extracting Chemical-Disease Relations from Academic Literature - -# Source: - https://github.com/snorkel-team/snorkel-extraction/tree/master/tutorials/cdr - -# Labels: - -0: Negative, the drug does NOT induce the disease -1: Positive, the drug induces the disease - - - -33 Label functions (Use ctrl+F to search for implementation) -LFs = [ - LF_c_cause_d, - LF_c_d, - LF_c_induced_d, - LF_c_treat_d, - LF_c_treat_d_wide, - LF_closer_chem, - LF_closer_dis, - LF_ctd_marker_c_d, - LF_ctd_marker_induce, - LF_ctd_therapy_treat, - LF_ctd_unspecified_treat, - LF_ctd_unspecified_induce, - LF_d_following_c, - LF_d_induced_by_c, - LF_d_induced_by_c_tight, - LF_d_treat_c, - LF_develop_d_following_c, - LF_far_c_d, - LF_far_d_c, - LF_improve_before_disease, - LF_in_ctd_therapy, - LF_in_ctd_marker, - LF_in_patient_with, - LF_induce, - LF_induce_name, - LF_induced_other, - LF_level, - LF_measure, - LF_neg_d, - LF_risk_d, - LF_treat_d, - LF_uncertain, - LF_weak_assertions, -] - - -##### Distant supervision approaches -# We'll use the [Comparative Toxicogenomics Database](http://ctdbase.org/) (CTD) for distant supervision. -# The CTD lists chemical-condition entity pairs under three categories: therapy, marker, and unspecified. -# Therapy means the chemical treats the condition, marker means the chemical is typically present with the condition, -# and unspecified is...unspecified. We can write LFs based on these categories. - -### LF_in_ctd_unspecified -def LF_in_ctd_unspecified(c): - return -1 * cand_in_ctd_unspecified(c) - -### LF_in_ctd_therapy -def LF_in_ctd_therapy(c): - return -1 * cand_in_ctd_therapy(c) - -### LF_in_ctd_marker -def LF_in_ctd_marker(c): - return cand_in_ctd_marker(c) - - - - - -##### Text pattern approaches -# Now we'll use some LF helpers to create LFs based on indicative text patterns. -# We came up with these rules by using the viewer to examine training candidates and noting frequent patterns. - -import re -from snorkel.lf_helpers import ( - get_tagged_text, - rule_regex_search_tagged_text, - rule_regex_search_btw_AB, - rule_regex_search_btw_BA, - rule_regex_search_before_A, - rule_regex_search_before_B, -) - -# List to parenthetical -def ltp(x): - return '(' + '|'.join(x) + ')' - -### LF_induce -def LF_induce(c): - return 1 if re.search(r'{{A}}.{0,20}induc.{0,20}{{B}}', get_tagged_text(c), flags=re.I) else 0 - -### LF_d_induced_by_c -causal_past = ['induced', 'caused', 'due'] -def LF_d_induced_by_c(c): - return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(causal_past) + '.{0,9}(by|to).{0,50}', 1) - -### LF_d_induced_by_c_tight -def LF_d_induced_by_c_tight(c): - return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(causal_past) + ' (by|to) ', 1) - -### LF_induce_name -def LF_induce_name(c): - return 1 if 'induc' in c.chemical.get_span().lower() else 0 - -### LF_c_cause_d -causal = ['cause[sd]?', 'induce[sd]?', 'associated with'] -def LF_c_cause_d(c): - return 1 if ( - re.search(r'{{A}}.{0,50} ' + ltp(causal) + '.{0,50}{{B}}', get_tagged_text(c), re.I) - and not re.search('{{A}}.{0,50}(not|no).{0,20}' + ltp(causal) + '.{0,50}{{B}}', get_tagged_text(c), re.I) - ) else 0 - -### LF_d_treat_c -treat = ['treat', 'effective', 'prevent', 'resistant', 'slow', 'promise', 'therap'] -def LF_d_treat_c(c): - return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(treat) + '.{0,50}', -1) - -### LF_c_treat_d -def LF_c_treat_d(c): - return rule_regex_search_btw_AB(c, '.{0,50}' + ltp(treat) + '.{0,50}', -1) - -### LF_treat_d -def LF_treat_d(c): - return rule_regex_search_before_B(c, ltp(treat) + '.{0,50}', -1) - -### LF_c_treat_d_wide -def LF_c_treat_d_wide(c): - return rule_regex_search_btw_AB(c, '.{0,200}' + ltp(treat) + '.{0,200}', -1) - -### LF_c_d -def LF_c_d(c): - return 1 if ('{{A}} {{B}}' in get_tagged_text(c)) else 0 - -### LF_c_induced_d -def LF_c_induced_d(c): - return 1 if ( - ('{{A}} {{B}}' in get_tagged_text(c)) and - (('-induc' in c[0].get_span().lower()) or ('-assoc' in c[0].get_span().lower())) - ) else 0 - -### LF_improve_before_disease -def LF_improve_before_disease(c): - return rule_regex_search_before_B(c, 'improv.*', -1) - -### LF_in_patient_with -pat_terms = ['in a patient with ', 'in patients with'] -def LF_in_patient_with(c): - return -1 if re.search(ltp(pat_terms) + '{{B}}', get_tagged_text(c), flags=re.I) else 0 - -### LF_uncertain -uncertain = ['combin', 'possible', 'unlikely'] -def LF_uncertain(c): - return rule_regex_search_before_A(c, ltp(uncertain) + '.*', -1) - -### LF_induced_other -def LF_induced_other(c): - return rule_regex_search_tagged_text(c, '{{A}}.{20,1000}-induced {{B}}', -1) - -### LF_far_c_d -def LF_far_c_d(c): - return rule_regex_search_btw_AB(c, '.{100,5000}', -1) - -### LF_far_d_c -def LF_far_d_c(c): - return rule_regex_search_btw_BA(c, '.{100,5000}', -1) - -### LF_risk_d -def LF_risk_d(c): - return rule_regex_search_before_B(c, 'risk of ', 1) - -### LF_develop_d_following_c -def LF_develop_d_following_c(c): - return 1 if re.search(r'develop.{0,25}{{B}}.{0,25}following.{0,25}{{A}}', get_tagged_text(c), flags=re.I) else 0 - -### LF_d_following_c -procedure, following = ['inject', 'administrat'], ['following'] -def LF_d_following_c(c): - return 1 if re.search('{{B}}.{0,50}' + ltp(following) + '.{0,20}{{A}}.{0,50}' + ltp(procedure), get_tagged_text(c), flags=re.I) else 0 - -### LF_measure -def LF_measure(c): - return -1 if re.search('measur.{0,75}{{A}}', get_tagged_text(c), flags=re.I) else 0 - -### LF_level -def LF_level(c): - return -1 if re.search('{{A}}.{0,25} level', get_tagged_text(c), flags=re.I) else 0 - -### LF_neg_d -def LF_neg_d(c): - return -1 if re.search('(none|not|no) .{0,25}{{B}}', get_tagged_text(c), flags=re.I) else 0 - -### LF_weak_assertions -WEAK_PHRASES = ['none', 'although', 'was carried out', 'was conducted', - 'seems', 'suggests', 'risk', 'implicated', - 'the aim', 'to (investigate|assess|study)'] - -WEAK_RGX = r'|'.join(WEAK_PHRASES) -def LF_weak_assertions(c): - return -1 if re.search(WEAK_RGX, get_tagged_text(c), flags=re.I) else 0 - - - - - - -##### Composite LFs - -# The following LFs take some of the strongest distant supervision and text pattern LFs, -# and combine them to form more specific LFs. These LFs introduce some obvious -# dependencies within the LF set, which we will model later. - -### LF_ctd_marker_c_d -def LF_ctd_marker_c_d(c): - return LF_c_d(c) * cand_in_ctd_marker(c) - -### LF_ctd_marker_induce -def LF_ctd_marker_induce(c): - return (LF_c_induced_d(c) or LF_d_induced_by_c_tight(c)) * cand_in_ctd_marker(c) - -### LF_ctd_therapy_treat -def LF_ctd_therapy_treat(c): - return LF_c_treat_d_wide(c) * cand_in_ctd_therapy(c) - -### LF_ctd_unspecified_treat -def LF_ctd_unspecified_treat(c): - return LF_c_treat_d_wide(c) * cand_in_ctd_unspecified(c) - -### LF_ctd_unspecified_induce -def LF_ctd_unspecified_induce(c): - return (LF_c_induced_d(c) or LF_d_induced_by_c_tight(c)) * cand_in_ctd_unspecified(c) - - - - - - -##### Rules based on context hierarchy -# These last two rules will make use of the context hierarchy. -# The first checks if there is a chemical mention much closer to the candidate's disease mention -# than the candidate's chemical mention. The second does the analog for diseases. - -### LF_closer_chem -def LF_closer_chem(c): - # Get distance between chemical and disease - chem_start, chem_end = c.chemical.get_word_start(), c.chemical.get_word_end() - dis_start, dis_end = c.disease.get_word_start(), c.disease.get_word_end() - if dis_start < chem_start: - dist = chem_start - dis_end - else: - dist = dis_start - chem_end - # Try to find chemical closer than @dist/2 in either direction - sent = c.get_parent() - closest_other_chem = float('inf') - for i in range(dis_end, min(len(sent.words), dis_end + dist // 2)): - et, cid = sent.entity_types[i], sent.entity_cids[i] - if et == 'Chemical' and cid != sent.entity_cids[chem_start]: - return -1 - for i in range(max(0, dis_start - dist // 2), dis_start): - et, cid = sent.entity_types[i], sent.entity_cids[i] - if et == 'Chemical' and cid != sent.entity_cids[chem_start]: - return -1 - return 0 - -### LF_closer_dis -def LF_closer_dis(c): - # Get distance between chemical and disease - chem_start, chem_end = c.chemical.get_word_start(), c.chemical.get_word_end() - dis_start, dis_end = c.disease.get_word_start(), c.disease.get_word_end() - if dis_start < chem_start: - dist = chem_start - dis_end - else: - dist = dis_start - chem_end - # Try to find chemical disease than @dist/8 in either direction - sent = c.get_parent() - for i in range(chem_end, min(len(sent.words), chem_end + dist // 8)): - et, cid = sent.entity_types[i], sent.entity_cids[i] - if et == 'Disease' and cid != sent.entity_cids[dis_start]: - return -1 - for i in range(max(0, chem_start - dist // 8), chem_start): - et, cid = sent.entity_types[i], sent.entity_cids[i] - if et == 'Disease' and cid != sent.entity_cids[dis_start]: - return -1 +CDR - Extracting Chemical-Disease Relations from Academic Literature + +# Source: + https://github.com/snorkel-team/snorkel-extraction/tree/master/tutorials/cdr + +# Labels: + +0: Negative, the drug does NOT induce the disease +1: Positive, the drug induces the disease + + + +33 Label functions (Use ctrl+F to search for implementation) +LFs = [ + LF_c_cause_d, + LF_c_d, + LF_c_induced_d, + LF_c_treat_d, + LF_c_treat_d_wide, + LF_closer_chem, + LF_closer_dis, + LF_ctd_marker_c_d, + LF_ctd_marker_induce, + LF_ctd_therapy_treat, + LF_ctd_unspecified_treat, + LF_ctd_unspecified_induce, + LF_d_following_c, + LF_d_induced_by_c, + LF_d_induced_by_c_tight, + LF_d_treat_c, + LF_develop_d_following_c, + LF_far_c_d, + LF_far_d_c, + LF_improve_before_disease, + LF_in_ctd_therapy, + LF_in_ctd_marker, + LF_in_patient_with, + LF_induce, + LF_induce_name, + LF_induced_other, + LF_level, + LF_measure, + LF_neg_d, + LF_risk_d, + LF_treat_d, + LF_uncertain, + LF_weak_assertions, +] + + +##### Distant supervision approaches +# We'll use the [Comparative Toxicogenomics Database](http://ctdbase.org/) (CTD) for distant supervision. +# The CTD lists chemical-condition entity pairs under three categories: therapy, marker, and unspecified. +# Therapy means the chemical treats the condition, marker means the chemical is typically present with the condition, +# and unspecified is...unspecified. We can write LFs based on these categories. + +### LF_in_ctd_unspecified +def LF_in_ctd_unspecified(c): + return -1 * cand_in_ctd_unspecified(c) + +### LF_in_ctd_therapy +def LF_in_ctd_therapy(c): + return -1 * cand_in_ctd_therapy(c) + +### LF_in_ctd_marker +def LF_in_ctd_marker(c): + return cand_in_ctd_marker(c) + + + + + +##### Text pattern approaches +# Now we'll use some LF helpers to create LFs based on indicative text patterns. +# We came up with these rules by using the viewer to examine training candidates and noting frequent patterns. + +import re +from snorkel.lf_helpers import ( + get_tagged_text, + rule_regex_search_tagged_text, + rule_regex_search_btw_AB, + rule_regex_search_btw_BA, + rule_regex_search_before_A, + rule_regex_search_before_B, +) + +# List to parenthetical +def ltp(x): + return '(' + '|'.join(x) + ')' + +### LF_induce +def LF_induce(c): + return 1 if re.search(r'{{A}}.{0,20}induc.{0,20}{{B}}', get_tagged_text(c), flags=re.I) else 0 + +### LF_d_induced_by_c +causal_past = ['induced', 'caused', 'due'] +def LF_d_induced_by_c(c): + return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(causal_past) + '.{0,9}(by|to).{0,50}', 1) + +### LF_d_induced_by_c_tight +def LF_d_induced_by_c_tight(c): + return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(causal_past) + ' (by|to) ', 1) + +### LF_induce_name +def LF_induce_name(c): + return 1 if 'induc' in c.chemical.get_span().lower() else 0 + +### LF_c_cause_d +causal = ['cause[sd]?', 'induce[sd]?', 'associated with'] +def LF_c_cause_d(c): + return 1 if ( + re.search(r'{{A}}.{0,50} ' + ltp(causal) + '.{0,50}{{B}}', get_tagged_text(c), re.I) + and not re.search('{{A}}.{0,50}(not|no).{0,20}' + ltp(causal) + '.{0,50}{{B}}', get_tagged_text(c), re.I) + ) else 0 + +### LF_d_treat_c +treat = ['treat', 'effective', 'prevent', 'resistant', 'slow', 'promise', 'therap'] +def LF_d_treat_c(c): + return rule_regex_search_btw_BA(c, '.{0,50}' + ltp(treat) + '.{0,50}', -1) + +### LF_c_treat_d +def LF_c_treat_d(c): + return rule_regex_search_btw_AB(c, '.{0,50}' + ltp(treat) + '.{0,50}', -1) + +### LF_treat_d +def LF_treat_d(c): + return rule_regex_search_before_B(c, ltp(treat) + '.{0,50}', -1) + +### LF_c_treat_d_wide +def LF_c_treat_d_wide(c): + return rule_regex_search_btw_AB(c, '.{0,200}' + ltp(treat) + '.{0,200}', -1) + +### LF_c_d +def LF_c_d(c): + return 1 if ('{{A}} {{B}}' in get_tagged_text(c)) else 0 + +### LF_c_induced_d +def LF_c_induced_d(c): + return 1 if ( + ('{{A}} {{B}}' in get_tagged_text(c)) and + (('-induc' in c[0].get_span().lower()) or ('-assoc' in c[0].get_span().lower())) + ) else 0 + +### LF_improve_before_disease +def LF_improve_before_disease(c): + return rule_regex_search_before_B(c, 'improv.*', -1) + +### LF_in_patient_with +pat_terms = ['in a patient with ', 'in patients with'] +def LF_in_patient_with(c): + return -1 if re.search(ltp(pat_terms) + '{{B}}', get_tagged_text(c), flags=re.I) else 0 + +### LF_uncertain +uncertain = ['combin', 'possible', 'unlikely'] +def LF_uncertain(c): + return rule_regex_search_before_A(c, ltp(uncertain) + '.*', -1) + +### LF_induced_other +def LF_induced_other(c): + return rule_regex_search_tagged_text(c, '{{A}}.{20,1000}-induced {{B}}', -1) + +### LF_far_c_d +def LF_far_c_d(c): + return rule_regex_search_btw_AB(c, '.{100,5000}', -1) + +### LF_far_d_c +def LF_far_d_c(c): + return rule_regex_search_btw_BA(c, '.{100,5000}', -1) + +### LF_risk_d +def LF_risk_d(c): + return rule_regex_search_before_B(c, 'risk of ', 1) + +### LF_develop_d_following_c +def LF_develop_d_following_c(c): + return 1 if re.search(r'develop.{0,25}{{B}}.{0,25}following.{0,25}{{A}}', get_tagged_text(c), flags=re.I) else 0 + +### LF_d_following_c +procedure, following = ['inject', 'administrat'], ['following'] +def LF_d_following_c(c): + return 1 if re.search('{{B}}.{0,50}' + ltp(following) + '.{0,20}{{A}}.{0,50}' + ltp(procedure), get_tagged_text(c), flags=re.I) else 0 + +### LF_measure +def LF_measure(c): + return -1 if re.search('measur.{0,75}{{A}}', get_tagged_text(c), flags=re.I) else 0 + +### LF_level +def LF_level(c): + return -1 if re.search('{{A}}.{0,25} level', get_tagged_text(c), flags=re.I) else 0 + +### LF_neg_d +def LF_neg_d(c): + return -1 if re.search('(none|not|no) .{0,25}{{B}}', get_tagged_text(c), flags=re.I) else 0 + +### LF_weak_assertions +WEAK_PHRASES = ['none', 'although', 'was carried out', 'was conducted', + 'seems', 'suggests', 'risk', 'implicated', + 'the aim', 'to (investigate|assess|study)'] + +WEAK_RGX = r'|'.join(WEAK_PHRASES) +def LF_weak_assertions(c): + return -1 if re.search(WEAK_RGX, get_tagged_text(c), flags=re.I) else 0 + + + + + + +##### Composite LFs + +# The following LFs take some of the strongest distant supervision and text pattern LFs, +# and combine them to form more specific LFs. These LFs introduce some obvious +# dependencies within the LF set, which we will model later. + +### LF_ctd_marker_c_d +def LF_ctd_marker_c_d(c): + return LF_c_d(c) * cand_in_ctd_marker(c) + +### LF_ctd_marker_induce +def LF_ctd_marker_induce(c): + return (LF_c_induced_d(c) or LF_d_induced_by_c_tight(c)) * cand_in_ctd_marker(c) + +### LF_ctd_therapy_treat +def LF_ctd_therapy_treat(c): + return LF_c_treat_d_wide(c) * cand_in_ctd_therapy(c) + +### LF_ctd_unspecified_treat +def LF_ctd_unspecified_treat(c): + return LF_c_treat_d_wide(c) * cand_in_ctd_unspecified(c) + +### LF_ctd_unspecified_induce +def LF_ctd_unspecified_induce(c): + return (LF_c_induced_d(c) or LF_d_induced_by_c_tight(c)) * cand_in_ctd_unspecified(c) + + + + + + +##### Rules based on context hierarchy +# These last two rules will make use of the context hierarchy. +# The first checks if there is a chemical mention much closer to the candidate's disease mention +# than the candidate's chemical mention. The second does the analog for diseases. + +### LF_closer_chem +def LF_closer_chem(c): + # Get distance between chemical and disease + chem_start, chem_end = c.chemical.get_word_start(), c.chemical.get_word_end() + dis_start, dis_end = c.disease.get_word_start(), c.disease.get_word_end() + if dis_start < chem_start: + dist = chem_start - dis_end + else: + dist = dis_start - chem_end + # Try to find chemical closer than @dist/2 in either direction + sent = c.get_parent() + closest_other_chem = float('inf') + for i in range(dis_end, min(len(sent.words), dis_end + dist // 2)): + et, cid = sent.entity_types[i], sent.entity_cids[i] + if et == 'Chemical' and cid != sent.entity_cids[chem_start]: + return -1 + for i in range(max(0, dis_start - dist // 2), dis_start): + et, cid = sent.entity_types[i], sent.entity_cids[i] + if et == 'Chemical' and cid != sent.entity_cids[chem_start]: + return -1 + return 0 + +### LF_closer_dis +def LF_closer_dis(c): + # Get distance between chemical and disease + chem_start, chem_end = c.chemical.get_word_start(), c.chemical.get_word_end() + dis_start, dis_end = c.disease.get_word_start(), c.disease.get_word_end() + if dis_start < chem_start: + dist = chem_start - dis_end + else: + dist = dis_start - chem_end + # Try to find chemical disease than @dist/8 in either direction + sent = c.get_parent() + for i in range(chem_end, min(len(sent.words), chem_end + dist // 8)): + et, cid = sent.entity_types[i], sent.entity_cids[i] + if et == 'Disease' and cid != sent.entity_cids[dis_start]: + return -1 + for i in range(max(0, chem_start - dist // 8), chem_start): + et, cid = sent.entity_types[i], sent.entity_cids[i] + if et == 'Disease' and cid != sent.entity_cids[dis_start]: + return -1 return 0 \ No newline at end of file diff --git a/cdr/test.json b/cdr/test.json index 883f7cc5bc1677302dd2a8343a34c64f0640eaf9..ffc5fa5ce8bbbfd286d7fc5e43596b0e73bc1f18 100644 --- a/cdr/test.json +++ b/cdr/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6802fdaff79fd2ecc9be2ee3c6e9afa4046f8dfa21c182f4c698554868450154 -size 3450757 +oid sha256:4737198366306565a7ae23ba29b20b3e457021a686c57232306b04a10a0ebfe8 +size 3642958 diff --git a/cdr/train.json b/cdr/train.json index 61037ca8251fd5e2292b86cf50551adb97a7b7a8..9043c62cad3e677b0abf9f2d9153d63d93222b87 100644 --- a/cdr/train.json +++ b/cdr/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91683e2a2a3d12c0094a14ba28fb4ca0f11c7f4b83278c2d89943f623f734b6b -size 6449334 +oid sha256:aef685319701179e17c148ac729bc0cbdace9c4355a784384b5c4da1f395347e +size 6672792 diff --git a/cdr/valid.json b/cdr/valid.json index eceaec4988f7e5320a2672e0315b3b58c714dc5a..cbdb3e62c59a0b2b65741d2a57a479d704920cef 100644 --- a/cdr/valid.json +++ b/cdr/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65a94f53e3f262fe4510d12c66b5fa5549927fda8dc94b6166a1696166bc7e27 -size 691098 +oid sha256:14f2ab3e62df6515d20ee72941c6be26af0aa51e1324c9908e86808b26041a25 +size 720463 diff --git a/census/labeled_ids.json b/census/labeled_ids.json deleted file mode 100644 index bd75d452b7defe5f60730d6d8af8d3297c929085..0000000000000000000000000000000000000000 --- a/census/labeled_ids.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15e139f67ba6082723814578d4c5a1b7d14fbce2ebe198f53cc8423da7789cde -size 1538 diff --git a/census/test.json b/census/test.json index dc7255d818f55df4359954b3110388d384543a2e..995d6ecbb4710a52e64193279d2175e0d9324083 100644 --- a/census/test.json +++ b/census/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad12ab08dd411302b2bb62e260882fba1a3fba9950755f4de39176ed25b6fa17 -size 15846146 +oid sha256:a47dd6436974a1277e443cc4fcef641ff8fd6052dfe19ba7df3b80ba58b14d12 +size 60700301 diff --git a/census/train.json b/census/train.json index b8bb8ad1bef60cb9176a1d78b1627d91a5053c63..b32823ffcbea225aead357c36242aad8f8c0cbce 100644 --- a/census/train.json +++ b/census/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8963c60ba970c24d9056e7ccb1905018b0c5bbcff39ac068fd38137075ee6d75 -size 9809260 +oid sha256:e0a17137af9d912090886b5b4427cd0eb5a58c49cde6cfea748d86d29ff24c7b +size 37587925 diff --git a/census/valid.json b/census/valid.json index 766aa2d6a415c7e615cfeeb14dd9237898a41967..e8eccdd3788abe74ed796d779aca8bc90be55dcc 100644 --- a/census/valid.json +++ b/census/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f81d01544d455203e04945774cafd4cac5a96819afaf45d2b70f45923c7e2f7 -size 5408748 +oid sha256:79a58b9023e30fd0ea23cf215b8546d93ee188373ba1768741c9f93e884ae76f +size 20729303 diff --git a/chemprot/readme.txt b/chemprot/readme.txt index d40b5b54beb2dd436553c18c6270b3fe5f97d5f6..62cda1fd767e1e1f0a03efb8fb10f972ce649228 100644 --- a/chemprot/readme.txt +++ b/chemprot/readme.txt @@ -1,213 +1,213 @@ -Chemprot Relation Classification Dataset -https://github.com/yueyu1030/COSINE/tree/main/data/chemprot - - - -# Labels - - "0": "Part of", - "1": "Regulator", - "2": "Upregulator", - "3": "Downregulator", - "4": "Agonist", - "5": "Antagonist", - "6": "Modulator", - "7": "Cofactor", - "8": "Substrate/Product", - "9": "NOT" - - - - -# Labeling Functions - - -## Part of -@labeling_function() -def lf_amino_acid(x): - return 1 if 'amino acid' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_replace(x): - return 1 if 'replace' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_mutant(x): - return 1 if 'mutant' in x.sentence.lower() or 'mutat' in x.sentence.lower() else ABSTAIN - - - - - - - - -## Regulator -@labeling_function() -def lf_bind(x): - return 2 if 'bind' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_interact(x): - return 2 if 'interact' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_affinity(x): - return 2 if 'affinit' in x.sentence.lower() else ABSTAIN - - - - - - - - - -## Upregulator -# Activator -@labeling_function() -def lf_activate(x): - return 3 if 'activat' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_increase(x): - return 3 if 'increas' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_induce(x): - return 3 if 'induc' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_stimulate(x): - return 3 if 'stimulat' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_upregulate(x): - return 3 if 'upregulat' in x.sentence.lower() else ABSTAIN - - - - - - - - - - - - -## Downregulator -@labeling_function() -def lf_downregulate(x): - return 4 if 'downregulat' in x.sentence.lower() or 'down-regulat' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_reduce(x): - return 4 if 'reduc' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_inhibit(x): - return 4 if 'inhibit' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_decrease(x): - return 4 if 'decreas' in x.sentence.lower() else ABSTAIN - - - - - - - - - - - -## Agonist -@labeling_function() -def lf_agonist(x): - return 5 if ' agoni' in x.sentence.lower() or "\tagoni" in x.sentence.lower() else ABSTAIN - - - - - - - - - -## Antagonist -@labeling_function() -def lf_antagonist(x): - return 6 if 'antagon' in x.sentence.lower() else ABSTAIN - - - - - - - - - -## Modulator -@labeling_function() -def lf_modulate(x): - return 7 if 'modulat' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_allosteric(x): - return 7 if 'allosteric' in x.sentence.lower() else ABSTAIN - - - - - - - - - -## Cofactor -@labeling_function() -def lf_cofactor(x): - return 8 if 'cofactor' in x.sentence.lower() else ABSTAIN - - - - - - - - -## Substrate/Product -@labeling_function() -def lf_substrate(x): - return 9 if 'substrate' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_transport(x): - return 9 if 'transport' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_catalyze(x): - return 9 if 'catalyz' in x.sentence.lower() or 'catalys' in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_product(x): - return 9 if "produc" in x.sentence.lower() else ABSTAIN - -@labeling_function() -def lf_convert(x): - return 9 if "conver" in x.sentence.lower() else ABSTAIN - - - - - - - - - -## NOT -@labeling_function() -def lf_not(x): +Chemprot Relation Classification Dataset +https://github.com/yueyu1030/COSINE/tree/main/data/chemprot + + + +# Labels + + "0": "Part of", + "1": "Regulator", + "2": "Upregulator", + "3": "Downregulator", + "4": "Agonist", + "5": "Antagonist", + "6": "Modulator", + "7": "Cofactor", + "8": "Substrate/Product", + "9": "NOT" + + + + +# Labeling Functions + + +## Part of +@labeling_function() +def lf_amino_acid(x): + return 1 if 'amino acid' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_replace(x): + return 1 if 'replace' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_mutant(x): + return 1 if 'mutant' in x.sentence.lower() or 'mutat' in x.sentence.lower() else ABSTAIN + + + + + + + + +## Regulator +@labeling_function() +def lf_bind(x): + return 2 if 'bind' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_interact(x): + return 2 if 'interact' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_affinity(x): + return 2 if 'affinit' in x.sentence.lower() else ABSTAIN + + + + + + + + + +## Upregulator +# Activator +@labeling_function() +def lf_activate(x): + return 3 if 'activat' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_increase(x): + return 3 if 'increas' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_induce(x): + return 3 if 'induc' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_stimulate(x): + return 3 if 'stimulat' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_upregulate(x): + return 3 if 'upregulat' in x.sentence.lower() else ABSTAIN + + + + + + + + + + + + +## Downregulator +@labeling_function() +def lf_downregulate(x): + return 4 if 'downregulat' in x.sentence.lower() or 'down-regulat' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_reduce(x): + return 4 if 'reduc' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_inhibit(x): + return 4 if 'inhibit' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_decrease(x): + return 4 if 'decreas' in x.sentence.lower() else ABSTAIN + + + + + + + + + + + +## Agonist +@labeling_function() +def lf_agonist(x): + return 5 if ' agoni' in x.sentence.lower() or "\tagoni" in x.sentence.lower() else ABSTAIN + + + + + + + + + +## Antagonist +@labeling_function() +def lf_antagonist(x): + return 6 if 'antagon' in x.sentence.lower() else ABSTAIN + + + + + + + + + +## Modulator +@labeling_function() +def lf_modulate(x): + return 7 if 'modulat' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_allosteric(x): + return 7 if 'allosteric' in x.sentence.lower() else ABSTAIN + + + + + + + + + +## Cofactor +@labeling_function() +def lf_cofactor(x): + return 8 if 'cofactor' in x.sentence.lower() else ABSTAIN + + + + + + + + +## Substrate/Product +@labeling_function() +def lf_substrate(x): + return 9 if 'substrate' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_transport(x): + return 9 if 'transport' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_catalyze(x): + return 9 if 'catalyz' in x.sentence.lower() or 'catalys' in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_product(x): + return 9 if "produc" in x.sentence.lower() else ABSTAIN + +@labeling_function() +def lf_convert(x): + return 9 if "conver" in x.sentence.lower() else ABSTAIN + + + + + + + + + +## NOT +@labeling_function() +def lf_not(x): return 10 if 'not' in x.sentence.lower() else ABSTAIN \ No newline at end of file diff --git a/chemprot/test.json b/chemprot/test.json index 93231f584bde63d66790f6624b4b74e46a2353bb..6bcf7973b995f1f39c33b19a903d2e4bd33983d5 100644 --- a/chemprot/test.json +++ b/chemprot/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:216ef85bb4f3b74db4a890efe0b28175d8e834405622ea1e83628af73300e42f -size 742506 +oid sha256:946949dffb01347c1b7e455488239f533d583afb5c0cfbc161391d74bc2783ea +size 1573325 diff --git a/chemprot/train.json b/chemprot/train.json index a5dd4375b41ae4b0406c97fc771a074346d56677..37cc14aef93818bf7f2ff14954bdd8ab7b95323c 100644 --- a/chemprot/train.json +++ b/chemprot/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9e77cf45eda15fcf098dcc588a0e48238c7bcb05d55e10a019c87c636223ffa -size 5945432 +oid sha256:44bde7cae6ab2e167cb3b97b1c120f758384cf53a8d96fb1b1d70a4fb634a98e +size 12594569 diff --git a/chemprot/valid.json b/chemprot/valid.json index e68718a4769302d5d4606025879b413cb4897ebd..04696502942a2685abf0be7b4dab6c34d115533d 100644 --- a/chemprot/valid.json +++ b/chemprot/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:672f43d5d89df65620b8a1d4b991f1f35ba450044177dc69e2e988a803c73adc -size 744536 +oid sha256:4843813b4fdd34bc71fea9e8fa6c7180ecf2bdd21c43ffb0e9c6f3d13b9369cf +size 1575355 diff --git a/commercial/readme.txt b/commercial/readme.txt index 1252e6004526af4f5289409a5724807b94421c39..6a95b69e8ddb889f4e1424e5c96f285f753704f8 100644 --- a/commercial/readme.txt +++ b/commercial/readme.txt @@ -1,22 +1,22 @@ -Commercial - -# Source: - -D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. - - -# Labels: -0: negative (the graph is not commercials) - -1: positive (the graph is commercials) - - - -4 Labeling functions - -LFs: In this dataset, there is a strong signal for the presence or absence of commercials in pixel histograms and the text; in particular, commercials are book-ended on either side by sequences of black frames, and commercial segments tend to have mixed-case or missing transcripts (whereas news segments are in all caps). We use these signals to build the weak supervision sources. - - - - - +Commercial + +# Source: + +D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. + + +# Labels: +0: negative (the graph is not commercials) + +1: positive (the graph is commercials) + + + +4 Labeling functions + +LFs: In this dataset, there is a strong signal for the presence or absence of commercials in pixel histograms and the text; in particular, commercials are book-ended on either side by sequences of black frames, and commercial segments tend to have mixed-case or missing transcripts (whereas news segments are in all caps). We use these signals to build the weak supervision sources. + + + + + diff --git a/commercial/test.json b/commercial/test.json index e35062413151fadbb4352765c783e32ff6fa713d..216dac8f70a7d5c6735f07f51ba1abf98a1d8991 100644 --- a/commercial/test.json +++ b/commercial/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c096f125a0d80437085a39795cde5e8b1a2147a2b22cad1b670b4f0bc54a675b -size 322533732 +oid sha256:b77b296f9d2a067afdd837ba0060aedc2f82ee5b7d083cc26d571ff4d70f0b88 +size 322526234 diff --git a/commercial/train.json b/commercial/train.json deleted file mode 100644 index ce22a1abb2549d1fa72b2a9843a4a775dfca4023..0000000000000000000000000000000000000000 --- a/commercial/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27d25bb8c139e2ea14e619ca72c647d62dadb3645ab0e40325db4e1653827a25 -size 2761720065 diff --git a/commercial/valid.json b/commercial/valid.json index 187dd8be830e76eab7de07d94a27472a67e72892..a2a51e0014f168497572c53695d955673dddbf46 100644 --- a/commercial/valid.json +++ b/commercial/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a67a253cdc2dddb8f838b1909e396fd78730a36e7244147608960017c885097 -size 407904603 +oid sha256:b63485b820d5942036e3403dc0cda177dc484bd2307c205b23b2e88ac7ecf077 +size 407895122 diff --git a/conll/test.json b/conll/test.json index e93b16d7b4875a892a6e4bdbaa1be5646f702bdb..fddf5a8adfa8b5ac93d67316247cddd073d51763 100644 --- a/conll/test.json +++ b/conll/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19750aba5f0bfe00be57924996be48eeaa6d4e29b21c92f7ecc680862baaa653 -size 4842695 +oid sha256:558fd0aff43c88df1d9b7cb77ca43b8ea48387c6a8256c07f91850fcbefac516 +size 12269564 diff --git a/conll/train.json b/conll/train.json index 5286d0d399eb887ccdd2e950d5d835c40a8a389f..a401f94b4ce583e514213ca495ccef938b8934d3 100644 --- a/conll/train.json +++ b/conll/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bedcd92c7d5667a886d08328ae4921b9265be79bc3a843757d4eaf60bd81526 -size 21139828 +oid sha256:d21ff7aba766a8ef9dbf342e99de47086cca25b2b64bc698010324e90ef91b3d +size 53648877 diff --git a/conll/valid.json b/conll/valid.json index afd71f3e5f6df685122662471836521c1cfa684e..3d30f2da4de5402eaefea51d7825e21e3a35c4a9 100644 --- a/conll/valid.json +++ b/conll/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c81a263d3586d891e39c60d329da398cd2119885c8ce2b3cab08173425d14027 -size 5315888 +oid sha256:6eea27ff5576fe552f38eeda3cc158fcb16308bf993894d5c9513510d33ed350 +size 13500610 diff --git a/imdb/readme.txt b/imdb/readme.txt index 8f17a01578275dee5e5370a2d6ce4d419e58332e..68c349166853353f17e7484da4d4fadd76db4567 100644 --- a/imdb/readme.txt +++ b/imdb/readme.txt @@ -1,60 +1,60 @@ -IMDB Sentiment Classification - -https://github.com/weakrules/Denoise-multi-weak-sources/tree/master/rules-noisy-labels/IMDB - -# Labels - -"0": "Negative", -"1": "Positive" - - -# Labeling functions - -lfs = [ - expression_nexttime, - keyword_compare, - keyword_general, - keyword_finish, - keyword_plot -] - - -# lf - expression_nexttime - -expression_nexttime = make_expression_lf(name="expression_nexttime", - pre_pos=["will ", " ll ", "would ", " d ", "can t wait to "], - expression=[" next time", " again", " rewatch", " anymore", " rewind"]) - - - - -# lf - keyword_compare - -keyword_compare = make_keyword_lf(name="keyword_compare", - keywords_pos=[], - keywords_neg=[" than this", " than the film", " than the movie"]) - - - -# lf - keyword_general - -keyword_general = make_keyword_lf(name="keyword_general", - keywords_pos=["masterpiece", "outstanding", "perfect", "great", "good", "nice", "best", "excellent", "worthy", "awesome", "enjoy", "positive", "pleasant", "wonderful", "amazing", "superb", "fantastic", "marvellous", "fabulous"], - keywords_neg=["bad", "worst", "horrible", "awful", "terrible", "crap", "shit", "garbage", "rubbish", "waste"]) - - - -# lf - keyword_finish - -keyword_finish = make_keyword_lf(name="keyword_finish", - keywords_pos=[], - keywords_neg=["fast forward", "n t finish"]) - - - - -# lf - keyword_plot - -keyword_plot = make_keyword_lf(name="keyword_plot", - keywords_pos=["well written", "absorbing", "attractive", "innovative", "instructive", "interesting", "touching", "moving"], +IMDB Sentiment Classification + +https://github.com/weakrules/Denoise-multi-weak-sources/tree/master/rules-noisy-labels/IMDB + +# Labels + +"0": "Negative", +"1": "Positive" + + +# Labeling functions + +lfs = [ + expression_nexttime, + keyword_compare, + keyword_general, + keyword_finish, + keyword_plot +] + + +# lf - expression_nexttime + +expression_nexttime = make_expression_lf(name="expression_nexttime", + pre_pos=["will ", " ll ", "would ", " d ", "can t wait to "], + expression=[" next time", " again", " rewatch", " anymore", " rewind"]) + + + + +# lf - keyword_compare + +keyword_compare = make_keyword_lf(name="keyword_compare", + keywords_pos=[], + keywords_neg=[" than this", " than the film", " than the movie"]) + + + +# lf - keyword_general + +keyword_general = make_keyword_lf(name="keyword_general", + keywords_pos=["masterpiece", "outstanding", "perfect", "great", "good", "nice", "best", "excellent", "worthy", "awesome", "enjoy", "positive", "pleasant", "wonderful", "amazing", "superb", "fantastic", "marvellous", "fabulous"], + keywords_neg=["bad", "worst", "horrible", "awful", "terrible", "crap", "shit", "garbage", "rubbish", "waste"]) + + + +# lf - keyword_finish + +keyword_finish = make_keyword_lf(name="keyword_finish", + keywords_pos=[], + keywords_neg=["fast forward", "n t finish"]) + + + + +# lf - keyword_plot + +keyword_plot = make_keyword_lf(name="keyword_plot", + keywords_pos=["well written", "absorbing", "attractive", "innovative", "instructive", "interesting", "touching", "moving"], keywords_neg=["to sleep", "fell asleep", "boring", "dull", "plain"]) \ No newline at end of file diff --git a/imdb/test.json b/imdb/test.json index 7ea012437a5f5c6d3266d119b5b3a51bdd700af5..699fe056bfb2cf10eaab34f9ad60b5978b692418 100644 --- a/imdb/test.json +++ b/imdb/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e98c2f35aa3c0acf81db7a07b1df918bd921c1e02f51785ccab8533b1e7cbf3 -size 3321504 +oid sha256:5fd75f6935d7e0a99bd2cb667e9052ee30a1283fd529155b02cd5d0364834100 +size 3319002 diff --git a/imdb/train.json b/imdb/train.json index 1171cfc089ff8545cb909c17ed28a656eeb3f6df..900108991f7622a963cbf86e24bd46445dfe7aa4 100644 --- a/imdb/train.json +++ b/imdb/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c415ba520bb77b92f2dd3ba458c6a04ddffac03f506094cd24f25d1b9a28f21 -size 26860548 +oid sha256:10c4c949f70392eedec3a2d225f2ada83b0c30ffb875a5cb975261c7e259a443 +size 26840546 diff --git a/imdb/valid.json b/imdb/valid.json index 9ea513e5865cc606f37ad0440c1853df8a1dd256..9a66ffcddc05336a2de5d014448584c6fb09ea4f 100644 --- a/imdb/valid.json +++ b/imdb/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7eb9f99bc2bbd161b02c861ba76dbf184b8f3a2330dbe9cb2c9e74b78265446a -size 3438658 +oid sha256:eb9cab9171b68628ed42b15f81ade895b50340ff556678dd36501c2e32cb6bc6 +size 3436156 diff --git a/laptopreview/test.json b/laptopreview/test.json index c8a8a0a145adbcd9c5dacbe92da13c0e2978c2e9..fc8e2cac271e1e692465847b2904da415e73a723 100644 --- a/laptopreview/test.json +++ b/laptopreview/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb79d1e7d55d5d9eda9bee1fec94d4c8f238f7a77f112b373f3bc1587773f3d3 -size 417616 +oid sha256:46482c4fec5fe3b30f186dd19742941f4bbb8664c9df13c8c2d009ed1aa54175 +size 1074084 diff --git a/laptopreview/train.json b/laptopreview/train.json index 6b12f2d7bf3ef28557fb3647de4cb91ae00c98cd..aeba4cca3c9fadf68cc6fca2a932c72cad0e911d 100644 --- a/laptopreview/train.json +++ b/laptopreview/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c0e8dbfb32b9258afb2265c09e8b090b98952471cc32d9ab92ecfa79762d1bd -size 1419276 +oid sha256:effaa5a90d050365124524d529331d9aeed0e2e222fbfcf7fdba2c735db0e518 +size 3675392 diff --git a/laptopreview/valid.json b/laptopreview/valid.json index 14c46d866836c5e1061dfcfffd1ad33c38bdc18c..f2263378853c16852b51c309b2a38ac55b42146d 100644 --- a/laptopreview/valid.json +++ b/laptopreview/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:649c0af83c0d03d80d38aef09208cb55622d1fcaa2b68b5ffc34c0349ea70aca -size 357053 +oid sha256:de41df8fba1d8b6fc15a60ee3002337dcc50040d79ce0ebf82f088f5701844f4 +size 924826 diff --git a/mit-movies/test.json b/mit-movies/test.json index 03176d26d04f67b4fd5655b7cffc0680798790c1..7f79d15bce4e6798c9babb4bfc0c887092a8f082 100644 --- a/mit-movies/test.json +++ b/mit-movies/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64d2381483199264a78a1dbd29cebdd94182ad72921e0e7c50b388fcd032f4b8 -size 1560081 +oid sha256:85d495f13cdc3349f2f740c42f045025ccfa92e8b0b7ec435b7efa20d87a1e7c +size 3762910 diff --git a/mit-movies/train.json b/mit-movies/train.json index 2fce24f042e704ea4b503e1cdd83d59841aaa483..8f559f044a799038943876e37b86c8d725758c1b 100644 --- a/mit-movies/train.json +++ b/mit-movies/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e689e7e792482f7d57bbb277651a6af726f4bcfdc84ef620b26116e92f1a87c3 -size 5959426 +oid sha256:05b3efdeccac9aa574e2c09d73a6ebc036120b7eb1101d9d7dc1d624a3316f96 +size 14370819 diff --git a/mit-movies/valid.json b/mit-movies/valid.json index a4fe634d687b54042f5d281d8a812a5f39ea52c0..f6b137df8a196ded37b8423344d79a8d1d868723 100644 --- a/mit-movies/valid.json +++ b/mit-movies/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96cfecb07cd03789d3f6c2ad26701a023a701a79514ea71a701f4a6af5d240e8 -size 325642 +oid sha256:b6ea0529fef32affb4aaf2c4d59fbae4b1627cfc9737fe44c3263440c4bcc225 +size 784910 diff --git a/mit-restaurants/test.json b/mit-restaurants/test.json index 7de5a8dcd3c425a00ebcbefb1455338076cfc097..148dd5ab46211e701fadb487b50634318193f550 100644 --- a/mit-restaurants/test.json +++ b/mit-restaurants/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe1d89a50e9a23a1013202d975a4dd4fd709cd20d2ff191901457de15efbef95 -size 1536926 +oid sha256:0e74f6b34f33bc25532459f8341f616318e87b857e8b99e222b82aa2c6e1b1fe +size 3841475 diff --git a/mit-restaurants/train.json b/mit-restaurants/train.json index cc8c22b00a73f084396025e3c38434d129087505..c67bb82f635948972f2bf952ca49212d2ba52d0c 100644 --- a/mit-restaurants/train.json +++ b/mit-restaurants/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4a484d66b3c11c93744bd2c4e8ca51fe6ebb7df815a7e0aad6664bb59fbd24a -size 7103265 +oid sha256:597cc7dfe76ab7e4f7d9b1f84f7d101a81ed8185d25ab475ce2fb8789e31c805 +size 17767148 diff --git a/mit-restaurants/valid.json b/mit-restaurants/valid.json index 47bf06b8398aa4f53f140da4954a826849908591..8aed3b808748738c96ac39c9f1cfa5dbc7c40654 100644 --- a/mit-restaurants/valid.json +++ b/mit-restaurants/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8736b68a31604c68e19f570dc9738193c946d1ac45fecdb417d0839306e7f39f -size 495057 +oid sha256:98f6069f1e7d8ee502abfd169a280e970e798fd0518107716e2f9490e816ada5 +size 1237753 diff --git a/mushroom/label.json b/mushroom/label.json deleted file mode 100644 index 32ba159f92d5bc403b1fe08c2197c65377cfcbbd..0000000000000000000000000000000000000000 --- a/mushroom/label.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:605ab4c1997200762a6d7d0b2988d79860e2c25ba7f513ff9278f324065c7b95 -size 24 diff --git a/mushroom/rules.json b/mushroom/rules.json deleted file mode 100644 index 3105955c182ce77184a8932ab91763e679f19ce3..0000000000000000000000000000000000000000 --- a/mushroom/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:525e9e6ebc3daa80ec0f12c8ce8aee301efbb0b9e97990810603ffeeac2eef7c -size 12485 diff --git a/mushroom/test.json b/mushroom/test.json deleted file mode 100644 index 119888649e6d3a2f44d8ef4a05d34ebac3579910..0000000000000000000000000000000000000000 --- a/mushroom/test.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aeebd21cc08b7281c20380cb9f2593bc83fe6714ac87e80fec60fc9eced81855 -size 165874 diff --git a/mushroom/train.json b/mushroom/train.json deleted file mode 100644 index 2666cba3e39bf70e42578cd19409a0dcc67c8100..0000000000000000000000000000000000000000 --- a/mushroom/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d5082ebff8b8b0ef335b0ca5e37aeafc0021e070817eeaeca31fcd88103af16 -size 1331983 diff --git a/mushroom/valid.json b/mushroom/valid.json deleted file mode 100644 index 85eae9db59a27c8f92e20cbd26b386baca89d9dc..0000000000000000000000000000000000000000 --- a/mushroom/valid.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fbe403fb3c0654dd5253b19cb4f8880350820effa10385cef81b14a2ce4ef661 -size 165630 diff --git a/ncbi-disease/test.json b/ncbi-disease/test.json index 0e18f7c75954d801ed78e8ff766169075dc20e25..d0ad7887f9f9ee04d26f59a8c8a1dfa4b3988fe5 100644 --- a/ncbi-disease/test.json +++ b/ncbi-disease/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1eacb74938748db2005e0a4e4e4de84b6a28282ddd2e6108d026ce38b5e5839f -size 975208 +oid sha256:7f9d50d8973fd8d8dd8fcefbad91c8643dc96eebd1581597a628c4af46d2832c +size 2537723 diff --git a/ncbi-disease/train.json b/ncbi-disease/train.json index 768cec54ae7373eee0367eb7506fc640f32f9ae6..460da809fd3ca16d0009b639e95b26abb3b90523 100644 --- a/ncbi-disease/train.json +++ b/ncbi-disease/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94f7a9abdd9abb0fdcfc26e36a9748ac52fd5f10d06fe7f901f7de79041bb82d -size 5466572 +oid sha256:4f523037312045cb8df872de6a76245d367624e1a926eff166ec98d18f388169 +size 14220988 diff --git a/ncbi-disease/valid.json b/ncbi-disease/valid.json index d90afb0db79d069e3b5f747e528d1ee12fd3f018..1220067b2129c2613aa37bc06457d537a86a4320 100644 --- a/ncbi-disease/valid.json +++ b/ncbi-disease/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7098dbf4dafe616471443ba81ed1a571440c7d0babbc256d0f57d9bb73d9d74 -size 958407 +oid sha256:b831c8220c54953b9a9c9cc57de6e04ee904775979d4713c8072836860753903 +size 2490594 diff --git a/ontonotes/test.json b/ontonotes/test.json index 7600568b166cbcb15c2620b30a2aa741edcc86af..003d87a08f27e4e0415382e4ffc8aa5fecaba4a1 100644 --- a/ontonotes/test.json +++ b/ontonotes/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3591d4a6dc30629ace50a9fb32b0c8bf1e3e1fade34b388ab1b58b3efa6a1318 -size 47769125 +oid sha256:e90b3484decbbcca777a73ee96138e7a6443b4af9069a2812243e870db5d6140 +size 122837114 diff --git a/ontonotes/train.json b/ontonotes/train.json index 985336b90ba1d28539d4d66815864fa9997a5c4b..6dba0de2e4d5ec3629d9a6b67710bc2432c5e1ba 100644 --- a/ontonotes/train.json +++ b/ontonotes/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbab90cb2d1a2735c37a328baf6d675389349183cf87738a22027423579550a7 -size 233796695 +oid sha256:7272e0c3f065f876fa44a8f0a4aa937aab9d449c495f317f80aa6d23d7ed4aa8 +size 600876591 diff --git a/ontonotes/valid.json b/ontonotes/valid.json index 2be4b7098f0973ce2e7b8757f80b94d26b830115..02261cc723c92068bbe625606306bb0014d4f589 100644 --- a/ontonotes/valid.json +++ b/ontonotes/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94fd3dbba4611c302d595b1191404daac1f388467209675ab8143ae5ae55b22a -size 8966702 +oid sha256:18b2d93e36940ddcfcb2b20bef71f3a8ccc98011bf1d1f2818de882a2457ac36 +size 23087570 diff --git a/semeval/readme.txt b/semeval/readme.txt index d00068f3a63eb4d71159952b7441ceeb693a944c..f1cef2ccee55a7f4e8ea769f6fd74d8dc9fd9a13 100644 --- a/semeval/readme.txt +++ b/semeval/readme.txt @@ -1,185 +1,185 @@ -NERO - semeval relation classification dataset - -# Source -https://github.com/INK-USC/NERO - -# Labels: -"0": "Cause-Effect" -"1": "Component-Whole" -"2": "Content-Container" -"3": "Entity-Destination" -"4": "Entity-Origin" -"5": "Instrument-Agency" -"6": "Member-Collection" -"7": "Message-Topic" -"8": "Product-Producer" - -# LFs - -Totally 164 labeling funcs - -['Cause-Effect(e1,e2)', 'SUBJ-O caused a OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O cause OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O caused OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH caused a OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O resulted in the OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O that resulted in the OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH resulted in the OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O leads to OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-O OBJ-CAUSE_OF_DEATH'], -['Cause-Effect(e1,e2)', 'SUBJ-O caused the OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-CRIMINAL_CHARGE resulted in the OBJ-O'], -['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH is one of * causes of OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O from OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH from OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O caused by the OBJ-CAUSE_OF_DEATH'], -['Cause-Effect(e2,e1)', 'SUBJ-O that has been caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O was caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O are caused by OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O after OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O after the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH after the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O is caused by OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH are caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O comes from the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O are caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O comes from OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O is caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O has been caused by OBJ-O'], -['Cause-Effect(e2,e1)', -'SUBJ-O that has been caused by the OBJ-CAUSE_OF_DEATH'], -['Cause-Effect(e2,e1)', 'SUBJ-O from OBJ-CAUSE_OF_DEATH'], -['Cause-Effect(e2,e1)', 'SUBJ-O was caused by a OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH triggered by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O was caused by OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O caused by a OBJ-O'], -['Cause-Effect(e2,e1)', 'OBJ-CAUSE_OF_DEATH SUBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O from this OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH was caused by a OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O has been caused by the OBJ-O'], -['Cause-Effect(e2,e1)', 'SUBJ-O after the OBJ-CAUSE_OF_DEATH'], -['Component-Whole(e1,e2)', 'SUBJ-O of the OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O of this OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O in my OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O of a OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O inside the OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O are parts of the OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O was the * part of this OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O was the best part of the OBJ-O'], -['Component-Whole(e1,e2)', 'SUBJ-O is a part of the OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O has a OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O includes the OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O had OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O contains a OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O is constructed from OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O are divided into OBJ-O'], -['Component-Whole(e2,e1)', 'SUBJ-O combines a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was inside a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was contained in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O were in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was locked in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was in the OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was enclosed in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was discovered inside a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-TITLE was in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O that was in the OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-CRIMINAL_CHARGE were in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was enclosed in OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O that was in a OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was contained in a large OBJ-O'], -['Content-Container(e1,e2)', 'SUBJ-O was stored in a OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O with OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O full of OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O contained a OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O was full of OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O that contains OBJ-O'], -['Content-Container(e2,e1)', 'SUBJ-O were a OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into the OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O to the OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into his OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O to OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into a OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O was put inside a OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O migrated into the OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O to OBJ-DATE'], -['Entity-Destination(e1,e2)', 'SUBJ-O has been added to the OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O were released into the OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into their OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into my OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into this OBJ-O'], -['Entity-Destination(e1,e2)', 'SUBJ-O into the OBJ-TITLE'], -['Entity-Destination(e1,e2)', 'SUBJ-O has been delivered to the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O had left the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O runs away from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O from outer OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O popped out of the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O went away from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O is made from OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O is distilled from OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O fell from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O from past OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O from different OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O from the OBJ-DATE'], -['Entity-Origin(e1,e2)', 'SUBJ-O emerged from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O took off from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O was sent from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O departs from the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O left the OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O originates from an OBJ-O'], -['Entity-Origin(e1,e2)', 'SUBJ-O release from the OBJ-O'], -['Entity-Origin(e2,e1)', 'SUBJ-O was farmed for OBJ-O'], -['Entity-Origin(e2,e1)', 'SUBJ-O are farmed for OBJ-O'], -['Instrument-Agency(e1,e2)', 'SUBJ-O for OBJ-O'], -['Instrument-Agency(e1,e2)', 'SUBJ-O are used by OBJ-O'], -['Instrument-Agency(e1,e2)', 'SUBJ-O enables the OBJ-TITLE'], -['Instrument-Agency(e1,e2)', 'SUBJ-O lets the OBJ-TITLE'], -['Instrument-Agency(e2,e1)', 'SUBJ-TITLE uses OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O uses a OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-TITLE with a OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O use OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O applied a OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O wields the OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O uses OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-TITLE uses a OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-TITLE manipulates a OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O took the OBJ-O'], -['Instrument-Agency(e2,e1)', 'SUBJ-O attaches a OBJ-O'], -['Member-Collection(e1,e2)', 'SUBJ-TITLE of the OBJ-O'], -['Member-Collection(e1,e2)', 'SUBJ-TITLE in the OBJ-O'], -['Member-Collection(e1,e2)', 'SUBJ-O collected in this OBJ-O'], -['Member-Collection(e1,e2)', 'SUBJ-TITLE joins the OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O of OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O of various OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O of different OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O of small OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O of * OBJ-O'], -['Member-Collection(e2,e1)', 'SUBJ-O , including OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O defining OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O contains a description of the OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O shows a OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O providing OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O explaining the OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O surveys the OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O makes the point that OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O examined the OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O describes the OBJ-O'], -['Message-Topic(e1,e2)', 'SUBJ-O states that the OBJ-O'], -['Message-Topic(e2,e1)', 'SUBJ-O related OBJ-O'], -['Product-Producer(e1,e2)', "SUBJ-O 's OBJ-TITLE"], -['Product-Producer(e1,e2)', 'SUBJ-O by the OBJ-TITLE'], -['Product-Producer(e1,e2)', 'SUBJ-O produced by the OBJ-O'], -['Product-Producer(e1,e2)', 'SUBJ-O founded by a OBJ-O'], -['Product-Producer(e1,e2)', 'SUBJ-O created by the OBJ-TITLE'], -['Product-Producer(e1,e2)', 'SUBJ-O , the OBJ-O'], -['Product-Producer(e1,e2)', 'SUBJ-O made by a OBJ-O'], -['Product-Producer(e1,e2)', 'SUBJ-O made by the OBJ-O'], -['Product-Producer(e1,e2)', 'SUBJ-O developed by the OBJ-O'], -['Product-Producer(e2,e1)', 'SUBJ-O produces OBJ-O'], -['Product-Producer(e2,e1)', 'SUBJ-O grow OBJ-O'], -['Product-Producer(e2,e1)', 'SUBJ-TITLE wrote a OBJ-O'], -['Product-Producer(e2,e1)', 'SUBJ-O build the OBJ-O'], -['Product-Producer(e2,e1)', 'SUBJ-TITLE made the OBJ-O'], +NERO - semeval relation classification dataset + +# Source +https://github.com/INK-USC/NERO + +# Labels: +"0": "Cause-Effect" +"1": "Component-Whole" +"2": "Content-Container" +"3": "Entity-Destination" +"4": "Entity-Origin" +"5": "Instrument-Agency" +"6": "Member-Collection" +"7": "Message-Topic" +"8": "Product-Producer" + +# LFs + +Totally 164 labeling funcs + +['Cause-Effect(e1,e2)', 'SUBJ-O caused a OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O cause OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O caused OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH caused a OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O resulted in the OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O that resulted in the OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH resulted in the OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O leads to OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-O OBJ-CAUSE_OF_DEATH'], +['Cause-Effect(e1,e2)', 'SUBJ-O caused the OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-CRIMINAL_CHARGE resulted in the OBJ-O'], +['Cause-Effect(e1,e2)', 'SUBJ-CAUSE_OF_DEATH is one of * causes of OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O from OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH from OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O caused by the OBJ-CAUSE_OF_DEATH'], +['Cause-Effect(e2,e1)', 'SUBJ-O that has been caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O was caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O are caused by OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O after OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O after the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH after the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O is caused by OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH are caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O comes from the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O are caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O comes from OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O is caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O has been caused by OBJ-O'], +['Cause-Effect(e2,e1)', +'SUBJ-O that has been caused by the OBJ-CAUSE_OF_DEATH'], +['Cause-Effect(e2,e1)', 'SUBJ-O from OBJ-CAUSE_OF_DEATH'], +['Cause-Effect(e2,e1)', 'SUBJ-O was caused by a OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH triggered by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O was caused by OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O caused by a OBJ-O'], +['Cause-Effect(e2,e1)', 'OBJ-CAUSE_OF_DEATH SUBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O from this OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-CAUSE_OF_DEATH was caused by a OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O has been caused by the OBJ-O'], +['Cause-Effect(e2,e1)', 'SUBJ-O after the OBJ-CAUSE_OF_DEATH'], +['Component-Whole(e1,e2)', 'SUBJ-O of the OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O of this OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O in my OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O of a OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O inside the OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O are parts of the OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O was the * part of this OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O was the best part of the OBJ-O'], +['Component-Whole(e1,e2)', 'SUBJ-O is a part of the OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O has a OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O includes the OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O had OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O contains a OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O is constructed from OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O are divided into OBJ-O'], +['Component-Whole(e2,e1)', 'SUBJ-O combines a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was inside a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was contained in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O were in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was locked in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was in the OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was enclosed in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was discovered inside a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-TITLE was in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O that was in the OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-CRIMINAL_CHARGE were in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was enclosed in OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O that was in a OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was contained in a large OBJ-O'], +['Content-Container(e1,e2)', 'SUBJ-O was stored in a OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O with OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O full of OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O contained a OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O was full of OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O that contains OBJ-O'], +['Content-Container(e2,e1)', 'SUBJ-O were a OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into the OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O to the OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into his OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O to OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into a OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O was put inside a OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O migrated into the OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O to OBJ-DATE'], +['Entity-Destination(e1,e2)', 'SUBJ-O has been added to the OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O were released into the OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into their OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into my OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into this OBJ-O'], +['Entity-Destination(e1,e2)', 'SUBJ-O into the OBJ-TITLE'], +['Entity-Destination(e1,e2)', 'SUBJ-O has been delivered to the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O had left the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O runs away from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O from outer OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O popped out of the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O went away from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O is made from OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O is distilled from OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O fell from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O from past OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O from different OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O from the OBJ-DATE'], +['Entity-Origin(e1,e2)', 'SUBJ-O emerged from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O took off from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O was sent from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O departs from the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O left the OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O originates from an OBJ-O'], +['Entity-Origin(e1,e2)', 'SUBJ-O release from the OBJ-O'], +['Entity-Origin(e2,e1)', 'SUBJ-O was farmed for OBJ-O'], +['Entity-Origin(e2,e1)', 'SUBJ-O are farmed for OBJ-O'], +['Instrument-Agency(e1,e2)', 'SUBJ-O for OBJ-O'], +['Instrument-Agency(e1,e2)', 'SUBJ-O are used by OBJ-O'], +['Instrument-Agency(e1,e2)', 'SUBJ-O enables the OBJ-TITLE'], +['Instrument-Agency(e1,e2)', 'SUBJ-O lets the OBJ-TITLE'], +['Instrument-Agency(e2,e1)', 'SUBJ-TITLE uses OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O uses a OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-TITLE with a OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O use OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O applied a OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O wields the OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O uses OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-TITLE uses a OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-TITLE manipulates a OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O took the OBJ-O'], +['Instrument-Agency(e2,e1)', 'SUBJ-O attaches a OBJ-O'], +['Member-Collection(e1,e2)', 'SUBJ-TITLE of the OBJ-O'], +['Member-Collection(e1,e2)', 'SUBJ-TITLE in the OBJ-O'], +['Member-Collection(e1,e2)', 'SUBJ-O collected in this OBJ-O'], +['Member-Collection(e1,e2)', 'SUBJ-TITLE joins the OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O of OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O of various OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O of different OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O of small OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O of * OBJ-O'], +['Member-Collection(e2,e1)', 'SUBJ-O , including OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O defining OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O contains a description of the OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O shows a OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O providing OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O explaining the OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O surveys the OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O makes the point that OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O examined the OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O describes the OBJ-O'], +['Message-Topic(e1,e2)', 'SUBJ-O states that the OBJ-O'], +['Message-Topic(e2,e1)', 'SUBJ-O related OBJ-O'], +['Product-Producer(e1,e2)', "SUBJ-O 's OBJ-TITLE"], +['Product-Producer(e1,e2)', 'SUBJ-O by the OBJ-TITLE'], +['Product-Producer(e1,e2)', 'SUBJ-O produced by the OBJ-O'], +['Product-Producer(e1,e2)', 'SUBJ-O founded by a OBJ-O'], +['Product-Producer(e1,e2)', 'SUBJ-O created by the OBJ-TITLE'], +['Product-Producer(e1,e2)', 'SUBJ-O , the OBJ-O'], +['Product-Producer(e1,e2)', 'SUBJ-O made by a OBJ-O'], +['Product-Producer(e1,e2)', 'SUBJ-O made by the OBJ-O'], +['Product-Producer(e1,e2)', 'SUBJ-O developed by the OBJ-O'], +['Product-Producer(e2,e1)', 'SUBJ-O produces OBJ-O'], +['Product-Producer(e2,e1)', 'SUBJ-O grow OBJ-O'], +['Product-Producer(e2,e1)', 'SUBJ-TITLE wrote a OBJ-O'], +['Product-Producer(e2,e1)', 'SUBJ-O build the OBJ-O'], +['Product-Producer(e2,e1)', 'SUBJ-TITLE made the OBJ-O'], ['Product-Producer(e2,e1)', 'SUBJ-O manufactured the OBJ-O'] \ No newline at end of file diff --git a/semeval/test.json b/semeval/test.json index 3367795c13c799964385e7898520b61b295e51c8..14c10cc1fe6c1147deab9848c347ba76ff11e298 100644 --- a/semeval/test.json +++ b/semeval/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5994aeb4f8ed93f0776ecf14ffd5da06f42b57c97ee544a112ed3b6dde4849f8 -size 547197 +oid sha256:efbd7d2c5ad2914c3d2b0489bb313e276dbbc7c8e323ebde7c4e57055d0614e7 +size 546595 diff --git a/semeval/train.json b/semeval/train.json index 702dbbb7f3411176c93dca346b19aecd2bfb5da6..0a916e568684c6c98fc63ef47b4a630b1c8a9806 100644 --- a/semeval/train.json +++ b/semeval/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d547783e4a592d450c22518fec5f67dccf782b21bfbceca49e0b3d85b2c1a9c5 -size 1588568 +oid sha256:90afb27ab2709128227a05f3582029439ba4db85f0f980e6079012058b70bc3c +size 1586817 diff --git a/semeval/valid.json b/semeval/valid.json index 22dfa1e277a11f383edfffe8da39b0f46f663e76..f102c46b0f6237f295309fcf4a8a60e1c7f58f47 100644 --- a/semeval/valid.json +++ b/semeval/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef62816a53928196cb64e109c73f998bb87aec3293a7a9a81b5358408fc09f13 -size 161826 +oid sha256:db9a4412d0b4866baf2370b482b35143bbdb4ecb7b64715bf1a5fde3049ed4fb +size 161646 diff --git a/sms/labeled_ids.json b/sms/labeled_ids.json deleted file mode 100644 index a44ec0774b914872f5cf94fae754aa5027a798dd..0000000000000000000000000000000000000000 --- a/sms/labeled_ids.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b81d3f72ae34716f0efbe0dd6b110abbd8b70cb8bc494d8623b1b2f3eb61b722 -size 1178 diff --git a/sms/readme.txt b/sms/readme.txt index 9f76cc0653387d9561f0864fc9e76514c5db8ebc..aa6df95821d211933c2f6869e16cdbb2847b46e6 100644 --- a/sms/readme.txt +++ b/sms/readme.txt @@ -1,86 +1,86 @@ -SMS spam classification - -# Source -https://github.com/awasthiabhijeet/Learning-From-Rules/blob/master/data/SMS/ - -# Labels -0 HAM -1 SPAM - -# Labeling Functions - -73 rules total, as shown below. - -ham ( |^)(thanks\.|thanks)[^\w]*( |$) Thanks. It was only from tescos but quite nice. All gone now. Speak soon -spam ( |^)(call|ringtone|ringtone)[^\w]* ([^\s]+ )*(free|free)[^\w]*( |$) Ringtone Club: Get the UK singles chart on your mobile each week and choose any top quality ringtone! This message is free of charge. -ham ( |^)(thats|thats)[^\w]* (\w+ ){0,1}(nice\.|nice)[^\w]*( |$) Well thats nice. Too bad i cant eat it -spam ( |^)(won|won)[^\w]* ([^\s]+ )*(cash|cash)[^\w]* ([^\s]+ )*(prize!|prize)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! -spam ( |^)(winner!|winner)[^\w]* ([^\s]+ )*(reward!|reward)[^\w]*( |$) WINNER! As a valued network customer you hvae been selected to receive a ??900 reward! To collect call 09061701444. Valid 24 hours only. ACL03530150PM -spam ( |^)(guaranteed|guaranteed)[^\w]* ([^\s]+ )*(free|free)[^\w]*( |$) Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16 -spam ( |^)(dating|dating)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) Someone has conacted our dating service and entered your phone because they fancy you!To find out who it is call from landline 09111030116. PoBox12n146tf15 -ham ( |^)(i)[^\w]* (\w+ ){0,1}(can|can)[^\w]* ([^\s]+ )*(did|did)[^\w]*( |$) Oh yes I can speak txt 2 u no! Hmm. Did u get email? -spam ( |^)(guranteed|guaranteed|guaranteed)[^\w]* ([^\s]+ )*(gift\.|gift)[^\w]*( |$) Great News! Call FREEFONE 08006344447 to claim your guaranteed ??1000 CASH or ??2000 gift. Speak to a live operator NOW! -spam ( |^)(call|call)[^\w]* ([^\s]+ )*(for|for)[^\w]* ([^\s]+ )*(offer|offers|offers\.)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 -ham ( |^)(can't|can't)[^\w]* (\w+ ){0,1}(talk|talk)[^\w]*( |$) sry can't talk on phone, with parents -ham ( |^)(i)[^\w]*( |$) Don know. I did't msg him recently. -ham ( |^)(u)[^\w]* ([^\s]+ )*(how|how)[^\w]* (\w+ ){0,1}(2)[^\w]*( |$) Do u noe how 2 send files between 2 computers? -ham ( |^)(should|should)[^\w]* (\w+ ){0,1}(i)[^\w]*( |$) Nah, Wednesday. When should I bring the mini cheetos bag over? -ham ( |^)(your|your)[^\w]* ([^\s]+ )*(i)[^\w]*( |$) is your hamster dead? Hey so tmr i meet you at 1pm orchard mrt? -ham ( |^)(i)[^\w]* ([^\s]+ )*(miss|miss)[^\w]*( |$) Goodnight da thangam I really miss u dear. -ham ( |^)(that's|that's)[^\w]* (\w+ ){0,1}(fine!|fine)[^\w]*( |$) Yeah, that's fine! It's ??6 to get in, is that ok? -spam ( |^)(won|won)[^\w]* ([^\s]+ )*(claim,|claim)[^\w]*( |$) 449050000301 You have won a ??2,000 price! To claim, call 09050000301. -spam ( |^)(welcome!|welcome)[^\w]* ([^\s]+ )*(reply|reply)[^\w]*( |$) Welcome! Please reply with your AGE and GENDER to begin. e.g 24M -ham ( |^)(mine\.|mine)[^\w]*( |$) 4 oclock at mine. Just to bash out a flat plan. -ham ( |^)(we|we)[^\w]* (\w+ ){0,1}(will|will)[^\w]*( |$) At 7 we will go ok na. -spam ( |^)(alert|urgent|urgent!)[^\w]* ([^\s]+ )*(award|awarded|awarded)[^\w]* ([^\s]+ )*(guaranteed\.|guaranteed)[^\w]*( |$) URGENT! Your Mobile number has been awarded with a ??2000 prize GUARANTEED. Call 09058094455 from land line. Claim 3030. Valid 12hrs only -ham ( |^)(do|do)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) Where do you need to go to get it? -spam ( |^)(no|no)[^\w]* (\w+ ){0,1}(extra|extra)[^\w]*( |$) SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE -spam ( |^)(unlimited|unlimited)[^\w]* ([^\s]+ )*(calls|calls)[^\w]*( |$) Freemsg: 1-month unlimited free calls! Activate SmartCall Txt: CALL to No: 68866. Subscriptn3gbp/wk unlimited calls Help: 08448714184 Stop?txt stop landlineonly -spam ( |^)(important|important)[^\w]* ([^\s]+ )*(lucky|lucky)[^\w]*( |$) IMPORTANT INFORMATION 4 ORANGE USER 0796XXXXXX. TODAY IS UR LUCKY DAY!2 FIND OUT WHY LOG ONTO http://www.urawinner.com THERE'S A FANTASTIC PRIZEAWAITING YOU! -ham ( |^)(i)[^\w]* ([^\s]+ )*(it|it)[^\w]*( |$) I re-met alex nichols from middle school and it turns out he's dealing! -ham ( |^)(where|where)[^\w]* ([^\s]+ )*(are|are)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) Where in abj are you serving. Are you staying with dad or alone. -ham ( |^)(my|my)[^\w]* ([^\s]+ )*(kids|kids)[^\w]*( |$) my ex-wife was not able to have kids. Do you want kids one day? -ham ( |^)(i)[^\w]* (\w+ ){0,1}(used|use|use)[^\w]* (\w+ ){0,1}(to|to)[^\w]*( |$) Normally i use to drink more water daily:) -spam ( |^)(new|new)[^\w]* (\w+ ){0,1}(mobiles|mobiles)[^\w]* ([^\s]+ )*(only|only)[^\w]*( |$) 500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY ??1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 -ham ( |^)(did|did)[^\w]* (\w+ ){0,1}(u)[^\w]* (\w+ ){0,1}(got|got)[^\w]*( |$) Did u got that persons story -spam ( |^)(chat|chat)[^\w]* (\w+ ){0,1}(to|to)[^\w]*( |$) Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 -spam ( |^)(won|won)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) RGENT! This is the 2nd attempt to contact U!U have WON ??1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max??7. 50 -spam ( |^)(latest|latest)[^\w]* (\w+ ){0,1}(offer|offers|offers\.)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 -spam ( |^)(expires|expires)[^\w]* ([^\s]+ )*(now!|now)[^\w]*( |$) IMPORTANT MESSAGE. This is a final contact attempt. You have important messages waiting out our customer claims dept. Expires 13/4/04. Call 08717507382 NOW! -spam ( |^)(win|win)[^\w]* ([^\s]+ )*(shopping|shopping)[^\w]*( |$) WIN a ??200 Shopping spree every WEEK Starting NOW. 2 play text STORE to 88039. SkilGme. TsCs08714740323 1Winawk! age16 ??1.50perweeksub. -ham ( |^)(i'll|i'll)[^\w]*( |$) Yar else i'll thk of all sorts of funny things. -spam ( |^)(chat|chat)[^\w]* ([^\s]+ )*(date|date)[^\w]*( |$) Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines! -spam ( |^)(please|please)[^\w]* (\w+ ){0,1}(call|call)[^\w]* ([^\s]+ )*(service|service)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! -spam ( |^)(free\.|free)[^\w]* ([^\s]+ )*(sex|sex)[^\w]*( |$) This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18 only -spam ( |^)(free|free)[^\w]* ([^\s]+ )*(price|price)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674 -spam ( |^)(cash|cash)[^\w]* ([^\s]+ )*(prize|prize|prize!)[^\w]*( |$) You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327. T&C: RSTM, SW7 3SS. 150ppm -ham ( |^)(fb|fb)[^\w]*( |$) Friends that u can stay on fb chat with -spam ( |^)(free|free)[^\w]* ([^\s]+ )*(phone|phones|phones)[^\w]*( |$) Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674& -ham ( |^)(noisy\.|noisy)[^\w]*( |$) Mine here like all fr china then so noisy. -ham ( |^)(adventuring|adventuring)[^\w]*( |$) happened here while you were adventuring -spam ( |^)(password|password)[^\w]*( |$) Send me your id and password -ham ( |^)(maggi|maggi)[^\w]*( |$) No need to buy lunch for me.. I eat maggi mee.. -ham ( |^)(wtf\.|wtf)[^\w]*( |$) <#> ISH MINUTES WAS 5 MINUTES AGO. WTF. -spam ( |^)(won|won)[^\w]* ([^\s]+ )*(cash|cash)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! -ham ( |^)(amrita|amrita)[^\w]*( |$) Staff of placement training in Amrita college. -ham ( |^)(praying|praying\.will|praying\.will)[^\w]*( |$) I am joining today formally.Pls keep praying.will talk later. -spam ( |^)(childporn|childporn)[^\w]*( |$) Ic. There are a lotta childporn cars then. -ham ( |^)(shit|shit)[^\w]*( |$) Just wanted to say holy shit you guys weren't kidding about this bud -spam ( |^)(credits|credits)[^\w]*( |$) SMS SERVICES For your inclusive text credits pls gotto www.comuk.net login 3qxj9 unsubscribe with STOP no extra charge help 08702840625 comuk.220cm2 9AE -ham ( |^)(goodo!|goodo)[^\w]* ([^\s]+ )*(we|we)[^\w]*( |$) Goodo! Yes we must speak friday - egg-potato ratio for tortilla needed! -spam ( |^)(latest|latest)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 -spam ( |^)(\?\?5000|\?\?5000)[^\w]* ([^\s]+ )*(09050090044|09050090044)[^\w]*( |$) WELL DONE! Your 4* Costa Del Sol Holiday or ??5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost??1.50/pm, Max10mins -spam ( |^)(hard|hard)[^\w]* (\w+ ){0,1}(live|live)[^\w]* ([^\s]+ )*(girl|girl)[^\w]*( |$) Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX -ham ( |^)(link|link)[^\w]*( |$) A link to your picture has been sent. You can also use http://alto18.co.uk/wave/wave.asp?o=44345 -spam ( |^)(urgent|urgent)[^\w]* ([^\s]+ )*(prize|prize)[^\w]*( |$) URGENT This is our 2nd attempt to contact U. Your ??900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893. ACL03530150PM -spam ( |^)(sms\.|sms)[^\w]* ([^\s]+ )*(reply|reply)[^\w]*( |$) SMS. ac Sptv: The New Jersey Devils and the Detroit Red Wings play Ice Hockey. Correct or Incorrect? End? Reply END SPTV -spam ( |^)(direct|direct)[^\w]*( |$) Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access! -spam ( |^)(voucher|voucher)[^\w]* ([^\s]+ )*(claim|claim)[^\w]*( |$) Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/reward. Ts&Cs apply. -spam ( |^)(\?\?1\.50|\?\?1\.50)[^\w]*( |$) Oh my god! I've found your number again! I'm so glad, text me back xafter this msgs cst std ntwk chg ??1.50 -ham ( |^)(hee|hee)[^\w]*( |$) They can try! They can get lost, in fact. Tee hee -ham ( |^)(jus|jus)[^\w]*( |$) Jus finished avatar nigro -spam ( |^)(free|free)[^\w]* ([^\s]+ )*(tone|tone)[^\w]*( |$) FREE RING TONE just text \POLYS\" to 87131. Then every week get a new tone. 0870737910216yrs only ??1.50/wk." -spam ( |^)(message\.|message)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) You have 1 new message. Please call 08715205273 -spam ( |^)(fantasies\.|fantasies)[^\w]* (\w+ ){0,1}(call|call)[^\w]*( |$) I'd like to tell you my deepest darkest fantasies. Call me 09094646631 just 60p/min. To stop texts call 08712460324 (nat rate) -spam ( |^)(\?\?500|\?\?500)[^\w]*( |$) Ur HMV Quiz cash-balance is currently ??500 - to maximize ur cash-in now send HMV1 to 86688 only 150p/msg +SMS spam classification + +# Source +https://github.com/awasthiabhijeet/Learning-From-Rules/blob/master/data/SMS/ + +# Labels +0 HAM +1 SPAM + +# Labeling Functions + +73 rules total, as shown below. + +ham ( |^)(thanks\.|thanks)[^\w]*( |$) Thanks. It was only from tescos but quite nice. All gone now. Speak soon +spam ( |^)(call|ringtone|ringtone)[^\w]* ([^\s]+ )*(free|free)[^\w]*( |$) Ringtone Club: Get the UK singles chart on your mobile each week and choose any top quality ringtone! This message is free of charge. +ham ( |^)(thats|thats)[^\w]* (\w+ ){0,1}(nice\.|nice)[^\w]*( |$) Well thats nice. Too bad i cant eat it +spam ( |^)(won|won)[^\w]* ([^\s]+ )*(cash|cash)[^\w]* ([^\s]+ )*(prize!|prize)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! +spam ( |^)(winner!|winner)[^\w]* ([^\s]+ )*(reward!|reward)[^\w]*( |$) WINNER! As a valued network customer you hvae been selected to receive a ??900 reward! To collect call 09061701444. Valid 24 hours only. ACL03530150PM +spam ( |^)(guaranteed|guaranteed)[^\w]* ([^\s]+ )*(free|free)[^\w]*( |$) Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16 +spam ( |^)(dating|dating)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) Someone has conacted our dating service and entered your phone because they fancy you!To find out who it is call from landline 09111030116. PoBox12n146tf15 +ham ( |^)(i)[^\w]* (\w+ ){0,1}(can|can)[^\w]* ([^\s]+ )*(did|did)[^\w]*( |$) Oh yes I can speak txt 2 u no! Hmm. Did u get email? +spam ( |^)(guranteed|guaranteed|guaranteed)[^\w]* ([^\s]+ )*(gift\.|gift)[^\w]*( |$) Great News! Call FREEFONE 08006344447 to claim your guaranteed ??1000 CASH or ??2000 gift. Speak to a live operator NOW! +spam ( |^)(call|call)[^\w]* ([^\s]+ )*(for|for)[^\w]* ([^\s]+ )*(offer|offers|offers\.)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 +ham ( |^)(can't|can't)[^\w]* (\w+ ){0,1}(talk|talk)[^\w]*( |$) sry can't talk on phone, with parents +ham ( |^)(i)[^\w]*( |$) Don know. I did't msg him recently. +ham ( |^)(u)[^\w]* ([^\s]+ )*(how|how)[^\w]* (\w+ ){0,1}(2)[^\w]*( |$) Do u noe how 2 send files between 2 computers? +ham ( |^)(should|should)[^\w]* (\w+ ){0,1}(i)[^\w]*( |$) Nah, Wednesday. When should I bring the mini cheetos bag over? +ham ( |^)(your|your)[^\w]* ([^\s]+ )*(i)[^\w]*( |$) is your hamster dead? Hey so tmr i meet you at 1pm orchard mrt? +ham ( |^)(i)[^\w]* ([^\s]+ )*(miss|miss)[^\w]*( |$) Goodnight da thangam I really miss u dear. +ham ( |^)(that's|that's)[^\w]* (\w+ ){0,1}(fine!|fine)[^\w]*( |$) Yeah, that's fine! It's ??6 to get in, is that ok? +spam ( |^)(won|won)[^\w]* ([^\s]+ )*(claim,|claim)[^\w]*( |$) 449050000301 You have won a ??2,000 price! To claim, call 09050000301. +spam ( |^)(welcome!|welcome)[^\w]* ([^\s]+ )*(reply|reply)[^\w]*( |$) Welcome! Please reply with your AGE and GENDER to begin. e.g 24M +ham ( |^)(mine\.|mine)[^\w]*( |$) 4 oclock at mine. Just to bash out a flat plan. +ham ( |^)(we|we)[^\w]* (\w+ ){0,1}(will|will)[^\w]*( |$) At 7 we will go ok na. +spam ( |^)(alert|urgent|urgent!)[^\w]* ([^\s]+ )*(award|awarded|awarded)[^\w]* ([^\s]+ )*(guaranteed\.|guaranteed)[^\w]*( |$) URGENT! Your Mobile number has been awarded with a ??2000 prize GUARANTEED. Call 09058094455 from land line. Claim 3030. Valid 12hrs only +ham ( |^)(do|do)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) Where do you need to go to get it? +spam ( |^)(no|no)[^\w]* (\w+ ){0,1}(extra|extra)[^\w]*( |$) SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE +spam ( |^)(unlimited|unlimited)[^\w]* ([^\s]+ )*(calls|calls)[^\w]*( |$) Freemsg: 1-month unlimited free calls! Activate SmartCall Txt: CALL to No: 68866. Subscriptn3gbp/wk unlimited calls Help: 08448714184 Stop?txt stop landlineonly +spam ( |^)(important|important)[^\w]* ([^\s]+ )*(lucky|lucky)[^\w]*( |$) IMPORTANT INFORMATION 4 ORANGE USER 0796XXXXXX. TODAY IS UR LUCKY DAY!2 FIND OUT WHY LOG ONTO http://www.urawinner.com THERE'S A FANTASTIC PRIZEAWAITING YOU! +ham ( |^)(i)[^\w]* ([^\s]+ )*(it|it)[^\w]*( |$) I re-met alex nichols from middle school and it turns out he's dealing! +ham ( |^)(where|where)[^\w]* ([^\s]+ )*(are|are)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) Where in abj are you serving. Are you staying with dad or alone. +ham ( |^)(my|my)[^\w]* ([^\s]+ )*(kids|kids)[^\w]*( |$) my ex-wife was not able to have kids. Do you want kids one day? +ham ( |^)(i)[^\w]* (\w+ ){0,1}(used|use|use)[^\w]* (\w+ ){0,1}(to|to)[^\w]*( |$) Normally i use to drink more water daily:) +spam ( |^)(new|new)[^\w]* (\w+ ){0,1}(mobiles|mobiles)[^\w]* ([^\s]+ )*(only|only)[^\w]*( |$) 500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY ??1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 +ham ( |^)(did|did)[^\w]* (\w+ ){0,1}(u)[^\w]* (\w+ ){0,1}(got|got)[^\w]*( |$) Did u got that persons story +spam ( |^)(chat|chat)[^\w]* (\w+ ){0,1}(to|to)[^\w]*( |$) Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 +spam ( |^)(won|won)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) RGENT! This is the 2nd attempt to contact U!U have WON ??1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max??7. 50 +spam ( |^)(latest|latest)[^\w]* (\w+ ){0,1}(offer|offers|offers\.)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 +spam ( |^)(expires|expires)[^\w]* ([^\s]+ )*(now!|now)[^\w]*( |$) IMPORTANT MESSAGE. This is a final contact attempt. You have important messages waiting out our customer claims dept. Expires 13/4/04. Call 08717507382 NOW! +spam ( |^)(win|win)[^\w]* ([^\s]+ )*(shopping|shopping)[^\w]*( |$) WIN a ??200 Shopping spree every WEEK Starting NOW. 2 play text STORE to 88039. SkilGme. TsCs08714740323 1Winawk! age16 ??1.50perweeksub. +ham ( |^)(i'll|i'll)[^\w]*( |$) Yar else i'll thk of all sorts of funny things. +spam ( |^)(chat|chat)[^\w]* ([^\s]+ )*(date|date)[^\w]*( |$) Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines! +spam ( |^)(please|please)[^\w]* (\w+ ){0,1}(call|call)[^\w]* ([^\s]+ )*(service|service)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! +spam ( |^)(free\.|free)[^\w]* ([^\s]+ )*(sex|sex)[^\w]*( |$) This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18 only +spam ( |^)(free|free)[^\w]* ([^\s]+ )*(price|price)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674 +spam ( |^)(cash|cash)[^\w]* ([^\s]+ )*(prize|prize|prize!)[^\w]*( |$) You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327. T&C: RSTM, SW7 3SS. 150ppm +ham ( |^)(fb|fb)[^\w]*( |$) Friends that u can stay on fb chat with +spam ( |^)(free|free)[^\w]* ([^\s]+ )*(phone|phones|phones)[^\w]*( |$) Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674& +ham ( |^)(noisy\.|noisy)[^\w]*( |$) Mine here like all fr china then so noisy. +ham ( |^)(adventuring|adventuring)[^\w]*( |$) happened here while you were adventuring +spam ( |^)(password|password)[^\w]*( |$) Send me your id and password +ham ( |^)(maggi|maggi)[^\w]*( |$) No need to buy lunch for me.. I eat maggi mee.. +ham ( |^)(wtf\.|wtf)[^\w]*( |$) <#> ISH MINUTES WAS 5 MINUTES AGO. WTF. +spam ( |^)(won|won)[^\w]* ([^\s]+ )*(cash|cash)[^\w]*( |$) Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed ??1000 cash or ??5000 prize! +ham ( |^)(amrita|amrita)[^\w]*( |$) Staff of placement training in Amrita college. +ham ( |^)(praying|praying\.will|praying\.will)[^\w]*( |$) I am joining today formally.Pls keep praying.will talk later. +spam ( |^)(childporn|childporn)[^\w]*( |$) Ic. There are a lotta childporn cars then. +ham ( |^)(shit|shit)[^\w]*( |$) Just wanted to say holy shit you guys weren't kidding about this bud +spam ( |^)(credits|credits)[^\w]*( |$) SMS SERVICES For your inclusive text credits pls gotto www.comuk.net login 3qxj9 unsubscribe with STOP no extra charge help 08702840625 comuk.220cm2 9AE +ham ( |^)(goodo!|goodo)[^\w]* ([^\s]+ )*(we|we)[^\w]*( |$) Goodo! Yes we must speak friday - egg-potato ratio for tortilla needed! +spam ( |^)(latest|latest)[^\w]*( |$) Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56 +spam ( |^)(\?\?5000|\?\?5000)[^\w]* ([^\s]+ )*(09050090044|09050090044)[^\w]*( |$) WELL DONE! Your 4* Costa Del Sol Holiday or ??5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost??1.50/pm, Max10mins +spam ( |^)(hard|hard)[^\w]* (\w+ ){0,1}(live|live)[^\w]* ([^\s]+ )*(girl|girl)[^\w]*( |$) Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX +ham ( |^)(link|link)[^\w]*( |$) A link to your picture has been sent. You can also use http://alto18.co.uk/wave/wave.asp?o=44345 +spam ( |^)(urgent|urgent)[^\w]* ([^\s]+ )*(prize|prize)[^\w]*( |$) URGENT This is our 2nd attempt to contact U. Your ??900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893. ACL03530150PM +spam ( |^)(sms\.|sms)[^\w]* ([^\s]+ )*(reply|reply)[^\w]*( |$) SMS. ac Sptv: The New Jersey Devils and the Detroit Red Wings play Ice Hockey. Correct or Incorrect? End? Reply END SPTV +spam ( |^)(direct|direct)[^\w]*( |$) Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access! +spam ( |^)(voucher|voucher)[^\w]* ([^\s]+ )*(claim|claim)[^\w]*( |$) Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/reward. Ts&Cs apply. +spam ( |^)(\?\?1\.50|\?\?1\.50)[^\w]*( |$) Oh my god! I've found your number again! I'm so glad, text me back xafter this msgs cst std ntwk chg ??1.50 +ham ( |^)(hee|hee)[^\w]*( |$) They can try! They can get lost, in fact. Tee hee +ham ( |^)(jus|jus)[^\w]*( |$) Jus finished avatar nigro +spam ( |^)(free|free)[^\w]* ([^\s]+ )*(tone|tone)[^\w]*( |$) FREE RING TONE just text \POLYS\" to 87131. Then every week get a new tone. 0870737910216yrs only ??1.50/wk." +spam ( |^)(message\.|message)[^\w]* ([^\s]+ )*(call|call)[^\w]*( |$) You have 1 new message. Please call 08715205273 +spam ( |^)(fantasies\.|fantasies)[^\w]* (\w+ ){0,1}(call|call)[^\w]*( |$) I'd like to tell you my deepest darkest fantasies. Call me 09094646631 just 60p/min. To stop texts call 08712460324 (nat rate) +spam ( |^)(\?\?500|\?\?500)[^\w]*( |$) Ur HMV Quiz cash-balance is currently ??500 - to maximize ur cash-in now send HMV1 to 86688 only 150p/msg spam ( |^)(inviting|inviting)[^\w]* ([^\s]+ )*(friend\.|friend)[^\w]*( |$) Natalie (20/F) is inviting you to be her friend. Reply YES-165 or NO-165 See her: www.SMS.ac/u/natalie2k9 STOP? Send STOP FRND to 62468 \ No newline at end of file diff --git a/sms/train.json b/sms/train.json index f18b7266e5667586f05ca1096152185dd29f74e8..7cea0261895f57310b59066a652d0351a291ad1b 100644 --- a/sms/train.json +++ b/sms/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d77f52d2af078dbcecffad72c6b22cb6f8fe89c68db0ad99e811be06ec46800 -size 1981811 +oid sha256:7ff3e72f71c30530a6b73083991d814c2ff34ed84e42a82d145c47508671dccb +size 6283122 diff --git a/spambase/label.json b/spambase/label.json deleted file mode 100644 index 6004bd8bcdcbb9250c56d3b37316c75f8ad1ff7d..0000000000000000000000000000000000000000 --- a/spambase/label.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2faf7e495bfc38eecea5d668ff0dee281d7fa4a672416986539a97400dc9ae40 -size 24 diff --git a/spambase/rules.json b/spambase/rules.json deleted file mode 100644 index f4f8014596dfdc7d53c028f7c68169759de3abbb..0000000000000000000000000000000000000000 --- a/spambase/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c97fa8a082f78da2734ac559b4bb5b36335f335859c089a1588f958b97d966ed -size 9627 diff --git a/spambase/test.json b/spambase/test.json deleted file mode 100644 index 5161efa61fd2477f0774b63141f12845972c1304..0000000000000000000000000000000000000000 --- a/spambase/test.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f42afb9a320b45cb766203277a8f33ed341a4b67a5cc41242632be2da601daae -size 193144 diff --git a/spambase/train.json b/spambase/train.json deleted file mode 100644 index cf74275a04eb56df0df6619313e141da3d02583a..0000000000000000000000000000000000000000 --- a/spambase/train.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8d193bab7931a6a2e152f4ec6aded89e98530cb5c3e7d53b8a038bc25e09b8a -size 1545227 diff --git a/spambase/valid.json b/spambase/valid.json deleted file mode 100644 index df3305c433010b0576053632f84f905919f4123c..0000000000000000000000000000000000000000 --- a/spambase/valid.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6548daf320185b6aea932a325d035ecad154a11c589d57bf7c1a6778c39feb7 -size 192952 diff --git a/spouse/readme.txt b/spouse/readme.txt index d24d4cdb7e5797bd9a9d1a06ff64031f855fc061..308ad58922eccace1946a22521b47242395b6a2d 100644 --- a/spouse/readme.txt +++ b/spouse/readme.txt @@ -1,124 +1,124 @@ -spouse relation classification - -# 9 labeling functions (weak_labels) -lfs = [ - lf_husband_wife, - lf_husband_wife_left_window, - lf_same_last_name, - lf_married, - lf_familial_relationship, - lf_family_left_window, - lf_other_relationship, - lf_distant_supervision, - lf_distant_supervision_last_names, -] - - -# Labels -0 as Negative -1 as Positive --1 as ABSTAIN - - - -#### LF 1 -# Check for the `spouse` words appearing between the person mentions -spouses = {"spouse", "wife", "husband", "ex-wife", "ex-husband"} -def lf_husband_wife(x, spouses): - return POSITIVE if len(spouses.intersection(set(x.between_tokens))) > 0 else ABSTAIN - - -#### LF 2 -# Check for the `spouse` words appearing to the left of the person mentions -def lf_husband_wife_left_window(x, spouses): - if len(set(spouses).intersection(set(x.person1_left_tokens))) > 0: - return POSITIVE - elif len(set(spouses).intersection(set(x.person2_left_tokens))) > 0: - return POSITIVE - else: - return ABSTAIN - -#### LF 3 -# Check for the person mentions having the same last name -@labeling_function(pre=[get_person_last_names]) -def lf_same_last_name(x): - p1_ln, p2_ln = x.person_lastnames - - if p1_ln and p2_ln and p1_ln == p2_ln: - return POSITIVE - return ABSTAIN - -#### LF 4 -# Check for the word `married` between person mentions -@labeling_function() -def lf_married(x): - return POSITIVE if "married" in x.between_tokens else ABSTAIN - -#### LF 5 -# Check for words that refer to `family` relationships between the person mentions -family = { - "father", - "mother", - "sister", - "brother", - "son", - "daughter", - "grandfather", - "grandmother", - "uncle", - "aunt", - "cousin", -} -family = family.union({f + "-in-law" for f in family}) - -def lf_familial_relationship(x, family): - return NEGATIVE if len(family.intersection(set(x.between_tokens))) > 0 else ABSTAIN - - -#### LF 6 -# Check for words that refer to `family` relationships to the left of the person mentions -def lf_family_left_window(x, family): - if len(set(family).intersection(set(x.person1_left_tokens))) > 0: - return NEGATIVE - elif len(set(family).intersection(set(x.person2_left_tokens))) > 0: - return NEGATIVE - else: - return ABSTAIN - - -#### LF 7 -# Check for `other` relationship words between person mentions -other = {"boyfriend", "girlfriend", "boss", "employee", "secretary", "co-worker"} -def lf_other_relationship(x, other): - return NEGATIVE if len(other.intersection(set(x.between_tokens))) > 0 else ABSTAIN - - -#### LF 8 -# Simple distant supervision labeling function via DBPedia -@labeling_function(resources=dict(known_spouses=known_spouses), pre=[get_person_text]) -def lf_distant_supervision(x, known_spouses): - p1, p2 = x.person_names - if (p1, p2) in known_spouses or (p2, p1) in known_spouses: - return POSITIVE - else: - return ABSTAIN - -#### LF 9 -# Last name pairs for known spouses -last_names = set( - [ - (last_name(x), last_name(y)) - for x, y in known_spouses - if last_name(x) and last_name(y) - ] -) -@labeling_function(resources=dict(last_names=last_names), pre=[get_person_last_names]) -def lf_distant_supervision_last_names(x, last_names): - p1_ln, p2_ln = x.person_lastnames - - return ( - POSITIVE - if (p1_ln != p2_ln) - and ((p1_ln, p2_ln) in last_names or (p2_ln, p1_ln) in last_names) - else ABSTAIN +spouse relation classification + +# 9 labeling functions (weak_labels) +lfs = [ + lf_husband_wife, + lf_husband_wife_left_window, + lf_same_last_name, + lf_married, + lf_familial_relationship, + lf_family_left_window, + lf_other_relationship, + lf_distant_supervision, + lf_distant_supervision_last_names, +] + + +# Labels +0 as Negative +1 as Positive +-1 as ABSTAIN + + + +#### LF 1 +# Check for the `spouse` words appearing between the person mentions +spouses = {"spouse", "wife", "husband", "ex-wife", "ex-husband"} +def lf_husband_wife(x, spouses): + return POSITIVE if len(spouses.intersection(set(x.between_tokens))) > 0 else ABSTAIN + + +#### LF 2 +# Check for the `spouse` words appearing to the left of the person mentions +def lf_husband_wife_left_window(x, spouses): + if len(set(spouses).intersection(set(x.person1_left_tokens))) > 0: + return POSITIVE + elif len(set(spouses).intersection(set(x.person2_left_tokens))) > 0: + return POSITIVE + else: + return ABSTAIN + +#### LF 3 +# Check for the person mentions having the same last name +@labeling_function(pre=[get_person_last_names]) +def lf_same_last_name(x): + p1_ln, p2_ln = x.person_lastnames + + if p1_ln and p2_ln and p1_ln == p2_ln: + return POSITIVE + return ABSTAIN + +#### LF 4 +# Check for the word `married` between person mentions +@labeling_function() +def lf_married(x): + return POSITIVE if "married" in x.between_tokens else ABSTAIN + +#### LF 5 +# Check for words that refer to `family` relationships between the person mentions +family = { + "father", + "mother", + "sister", + "brother", + "son", + "daughter", + "grandfather", + "grandmother", + "uncle", + "aunt", + "cousin", +} +family = family.union({f + "-in-law" for f in family}) + +def lf_familial_relationship(x, family): + return NEGATIVE if len(family.intersection(set(x.between_tokens))) > 0 else ABSTAIN + + +#### LF 6 +# Check for words that refer to `family` relationships to the left of the person mentions +def lf_family_left_window(x, family): + if len(set(family).intersection(set(x.person1_left_tokens))) > 0: + return NEGATIVE + elif len(set(family).intersection(set(x.person2_left_tokens))) > 0: + return NEGATIVE + else: + return ABSTAIN + + +#### LF 7 +# Check for `other` relationship words between person mentions +other = {"boyfriend", "girlfriend", "boss", "employee", "secretary", "co-worker"} +def lf_other_relationship(x, other): + return NEGATIVE if len(other.intersection(set(x.between_tokens))) > 0 else ABSTAIN + + +#### LF 8 +# Simple distant supervision labeling function via DBPedia +@labeling_function(resources=dict(known_spouses=known_spouses), pre=[get_person_text]) +def lf_distant_supervision(x, known_spouses): + p1, p2 = x.person_names + if (p1, p2) in known_spouses or (p2, p1) in known_spouses: + return POSITIVE + else: + return ABSTAIN + +#### LF 9 +# Last name pairs for known spouses +last_names = set( + [ + (last_name(x), last_name(y)) + for x, y in known_spouses + if last_name(x) and last_name(y) + ] +) +@labeling_function(resources=dict(last_names=last_names), pre=[get_person_last_names]) +def lf_distant_supervision_last_names(x, last_names): + p1_ln, p2_ln = x.person_lastnames + + return ( + POSITIVE + if (p1_ln != p2_ln) + and ((p1_ln, p2_ln) in last_names or (p2_ln, p1_ln) in last_names) + else ABSTAIN ) \ No newline at end of file diff --git a/spouse/test.json b/spouse/test.json index ac09193d102fa2220ac273cf059ba444d3b795e6..869f91926bcf1c24a1d2f0bcaadcc3d9eaa5591b 100644 --- a/spouse/test.json +++ b/spouse/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27ac9bd02930b03e0b4c94da253d682f81b138adfbc9d04c2f3d60d8eeb6a1cf -size 2067582 +oid sha256:e854b5030f9a7baca6f44da443bbfa82e15163c9a31b8d5ec6e0330df4cf3c85 +size 2067583 diff --git a/spouse/train.json b/spouse/train.json index 242721e6db4157aade75309facd7cca0a8ff689c..28fbc1d88a12e6055be673c553ea66235bb5294c 100644 --- a/spouse/train.json +++ b/spouse/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50b1ebd6ec2b54599e983d760140159dcb23d2ba8d5ac676795c4e020d26fed3 -size 17721268 +oid sha256:f5c12dbf7648a66ebd0803966847b5b309277d557844035b3f2fdd8679ae4b0f +size 17721269 diff --git a/spouse/valid.json b/spouse/valid.json index 1b14d6d0166b088b0b3dfa570d92edba5b016973..55811bd47465d0b5ad5a52a6ea5fe341aee3c72a 100644 --- a/spouse/valid.json +++ b/spouse/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8bd2f7b293a7d6a4c0c68dce78cc5593725f86c39d14cfa19c4f46c2254d9985 -size 2228791 +oid sha256:593f980972c0109d76cc3225a3933a152daab970edf496de197e1f47b381d2e1 +size 2228792 diff --git a/tennis/readme.txt b/tennis/readme.txt index 4b133416d7b12562c557e2cdb28047a685fab663..d8dd56ac25e4aabc83ac0d1afca649a812f84489 100644 --- a/tennis/readme.txt +++ b/tennis/readme.txt @@ -1,18 +1,18 @@ -Tennis Rally - -#Source: - -D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. - - -#Labels: - -0: negative (the game is not rally segment) - -1: positive (the game is rally segment) - - - -6 Labeling functions - +Tennis Rally + +#Source: + +D. Y. Fu, M. F. Chen, F. Sala, S. M. Hooper, K. Fatahalian, and C. Ré. Fast and three-rious: Speeding up weak supervision with triplet methods. In ICML, pages 3280–3291, 2020. + + +#Labels: + +0: negative (the game is not rally segment) + +1: positive (the game is rally segment) + + + +6 Labeling functions + LFs: this dataset uses an off-the-shelf pose detector to provide primitives for the weak supervision sources. The supervision sources are heuristics based on the number of people on court and their positions. Additional supervision sources use color histograms of the frames (i.e., how green the frame is, or whether there are enough white pixels for the court markings to be shown). \ No newline at end of file diff --git a/tennis/test.json b/tennis/test.json index f0e2d7922b3868a108881b45a3500ff3c5a09243..52213e6254d303ef4482e31f154804ecdb0bb538 100644 --- a/tennis/test.json +++ b/tennis/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84e185327ddf67f59d48656259f8e6ad282e93ff6150e6c735d967512081c8b7 -size 45502196 +oid sha256:74b45cf192a17080b574807c4ce2318bfe62833dc08e09c55f9effa1535e2397 +size 45501096 diff --git a/tennis/train.json b/tennis/train.json index e4f8363f44b139e3edf90f2ca2fa1a50248bee06..883b1240721c07c16c42f9c63e1f285adb703ba4 100644 --- a/tennis/train.json +++ b/tennis/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:600b89f8cf4a0ccea1cdba5b64dc11c3bbecf0ffc485d58abda2d7bf66e75caf -size 288396801 +oid sha256:8815b30cf1f483a383bded0c8ecd5fa1ebbcac62ca79452c57a49d03323ce1a7 +size 288389840 diff --git a/tennis/valid.json b/tennis/valid.json index d681ac1321cfedaf3b526faf9d01e785c15b7ff1..8a9d18cd569a2a3a6d3f62be7006c6f6635c0180 100644 --- a/tennis/valid.json +++ b/tennis/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63b0e6986787f7bf5e637bc6d555d40d013d3e55c6a82f07a4640d8ecd28d4be -size 30914911 +oid sha256:99886effe36a3fce784106887bd66f00cdd8627feab7f8772dac67f4604f2429 +size 30914163 diff --git a/trec/labeled_ids.json b/trec/labeled_ids.json deleted file mode 100644 index c9aec06ca5c79a5c68560420eaef974f4fe4a02a..0000000000000000000000000000000000000000 --- a/trec/labeled_ids.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:340853e0e847642834043eb814656883c85b6ce957e6195d2965c15741c757c6 -size 1130 diff --git a/trec/readme.txt b/trec/readme.txt index ce444497bf4487b29a51d18842bf21d02b2d71fe..1dd57e1137beafa9437b1f04673cb349ef1669f4 100644 --- a/trec/readme.txt +++ b/trec/readme.txt @@ -1,87 +1,87 @@ -TREC Question Classification - -# Source -https://github.com/awasthiabhijeet/Learning-From-Rules/tree/master/data/TREC - - -# Labels -Description (DESC) : 0 -Entity (ENTY) : 1 -Human (HUM) : 2 -Abbreviation(ABBR): 3 -Location(LOC) : 4 -Number (NUM): 5} - - -# Label Functions - -68 labeling functions total, as show below. - -ENTITY ( |^)(name|name)[^\w]* (\w+ ){0,1}(a)[^\w]*( |$) Name a canine cartoon character other than Huckleberry Hound to have a voice by Daws Butler . -DESCRIPTION ( |^)(how|how)[^\w]* (\w+ ){0,1}(does|to|can|should|would|could|will|do|do)[^\w]*( |$) How do you throw a housewarming party ? -DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* ([^\s]+ )*(hypertension|hypertension)[^\w]*( |$) What is the medical condition of hypertension ? -LOCATION ( |^)(which|where|what|what)[^\w]* ([^\s]+ )*(near|close to|far|around|surrounds|surrounds)[^\w]*( |$) What ocean surrounds the Madeira Islands ? -HUMAN ( |^)(which|who|what|what)[^\w]* ([^\s]+ )*(person|man|woman|human|poet|poet)[^\w]*( |$) What 2th-century American poet wrote a four-volume biography of Abraham Lincoln ? -ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(.*er|fastener|fastener)[^\w]* ([^\s]+ )*(played|play|run|study |studied|patent|patent)[^\w]*( |$) What fastener did Whitcomb Judson patent in 1893 ? -DESCRIPTION ( |^)(how|how)[^\w]* (\w+ ){0,1}(do|do)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) How do you find out what is allowed to claim as a contibution for income tax purposes ? -HUMAN ( |^)(who|what|what)[^\w]* (\w+ ){0,1}(person|man|woman|human|president|president)[^\w]*( |$) What president also became a supreme court justice ? -NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many hearts does an octopus have ? -LOCATION ( |^)(which|what|where|where)[^\w]* ([^\s]+ )*(situated|located|located)[^\w]*( |$) Where is Microsoft 's corporate headquarters located ? -HUMAN ( |^)(who|who)[^\w]* ([^\s]+ )*(man|woman|human|person|person)[^\w]*( |$) Who is the richest person in the world ? -ENTITY ( |^)(which|what|what)[^\w]* ([^\s]+ )*(team|group|groups|teams|teams)[^\w]*( |$) What 's the most common nickname of U.S. college football teams ? -LOCATION ( |^)(where|where)[^\w]* ([^\s]+ )*(stand|stand)[^\w]*( |$) Where must a soccer goalie stand to be permitted to handle the ball ? -DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(mean|meant|meant)[^\w]*( |$) What is meant by `` capital market '' ? -ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(kind|kind)[^\w]*( |$) What kind of sport is often associated with hooligans ? -NUMERIC ( |^)(what|what)[^\w]* (\w+ ){0,1}(amount|number|percentage|percentage)[^\w]*( |$) What percentage of the body is muscle ? -LOCATION ( |^)(capital|capital)[^\w]* (\w+ ){0,1}(of|of)[^\w]*( |$) What is the capital of Uruguay ? -DESCRIPTION ( |^)(why|why)[^\w]* (\w+ ){0,1}(does|should |shall|could|would|will|can|do|do)[^\w]*( |$) Why do recipe books recommend starting with cold water when you boil something ? -ENTITY ( |^)(composed|made|made)[^\w]* (\w+ ){0,1}(from|through|using|by|of|of)[^\w]*( |$) What was paper made of in the late 16th century ? -LOCATION ( |^)(where|which|what|what)[^\w]* (\w+ ){0,1}(island|island)[^\w]*( |$) What island group is Guadalcanal a part of ? -HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(owner|leads|governs|pays|owns|owns)[^\w]*( |$) Who owns CNN ? -DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* (\w+ ){0,1}(tetrinet|tetrinet)[^\w]*( |$) What is Tetrinet ? -HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(found|discovered|made|built|build|invented|invented)[^\w]*( |$) Who invented volleyball ? -ENTITY ( |^)(what|what)[^\w]* ([^\s]+ )*(called|called)[^\w]*( |$) What are the historical trials following World War II called ? -DESCRIPTION ( |^)(unusual|unusual)[^\w]*( |$) What was unusual about Alexandra 's appearance in Josie and the Pussycats ? -DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(origin|origin)[^\w]*( |$) What is the origin of the term soda jerk ? -LOCATION ( |^)(country|country)[^\w]*( |$) What country lies directly south of Detroit ? -LOCATION ( |^)(where|where)[^\w]*( |$) Where did Wile E. Coyote always get his devices ? -NUMERIC ( |^)(which|what|what)[^\w]* ([^\s]+ )*(time|day|month|hours|minute|seconds|year|date|date)[^\w]*( |$) What was the date of CNN 's first broadcast ? -DESCRIPTION ( |^)(why|why)[^\w]* (\w+ ){0,1}(does|doesn|doesn)[^\w]*( |$) Why doesn 't www.answers.com have any answers to my questions ? -HUMAN ( |^)(queen|king|king)[^\w]*( |$) What king was forced to agree to the Magna Carta ? -NUMERIC ( |^)(year|year)[^\w]*( |$) What year did the United States pass the Copyright law ? -ENTITY ( |^)(novel|novel)[^\w]*( |$) What 1956 Grace Metalious novel was on the best-seller list for two years ? -DESCRIPTION ( |^)(used|used)[^\w]* (\w+ ){0,1}(for|for)[^\w]*( |$) What is the S&P 500 used for ? -NUMERIC ( |^)(when|when)[^\w]* (\w+ ){0,1}(did|do|does|was|was)[^\w]*( |$) When was Yemen reunified ? -DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(kind|kind)[^\w]*( |$) Winnie the Pooh is what kind of animal ? -NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(old|far|long|tall|wide|short|small|close|long|long)[^\w]*( |$) How long would it take to get from Earth to Mars ? -NUMERIC ( |^)(speed|speed)[^\w]*( |$) What is the speed of the Mississippi River ? -ABBREVIATION ( |^)(abbreviation|abbreviation)[^\w]*( |$) CNN is the abbreviation for what ? -NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many visitors go to the Vatican each year ? -NUMERIC ( |^)(what|what)[^\w]* ([^\s]+ )*(percentage|share|number|population|population)[^\w]*( |$) What is the population of Japan ? -DESCRIPTION ( |^)(explain|describe|what|what)[^\w]*( |$) What are the 10 plagues of Egypt ? -LOCATION ( |^)(located|located)[^\w]*( |$) What country is located at 13 degrees North latitude and 10 degrees East longitude ? -ENTITY ( |^)(thing|instance|object|object)[^\w]*( |$) What is a 2-sided object called ? -HUMAN ( |^)(who|who)[^\w]*( |$) Who was the lawyer for Randy Craft ? -ENTITY ( |^)(fear|fear)[^\w]* (\w+ ){0,1}(of|of)[^\w]*( |$) What is a fear of insanity ? -DESCRIPTION ( |^)(explain|describe|how|how)[^\w]* (\w+ ){0,1}(can|can)[^\w]*( |$) How can you be happy ? -HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(worked|lived|guarded|watched|played|ate|slept|portrayed|served|served)[^\w]*( |$) Who served as inspiration for the schoolteacher portrayed by Robin Williams in `` Dead Poets Society '' ? -NUMERIC ( |^)(what|what)[^\w]* (\w+ ){0,1}(part|division|ratio|percentage|percentage)[^\w]*( |$) Of children between the ages of two and eleven , what percentage watch `` The Simpsons '' ? -DESCRIPTION ( |^)(explain|describe|what|what)[^\w]* ([^\s]+ )*(mean|mean)[^\w]*( |$) What does the word terrorism mean ? -DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(demands|take|take)[^\w]*( |$) What does it take to become a lawyer ? -HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(is|will|was|was)[^\w]* ([^\s]+ )*(leader|citizen|captain|nationalist|hero|actor|actress|star|gamer|player|lawyer|president|president)[^\w]*( |$) Who was the 1st U.S. President ? -ENTITY ( |^)(name|name)[^\w]*( |$) What other name were the `` Little Rascals '' known as ? -DESCRIPTION ( |^)(how|what|what)[^\w]* (\w+ ){0,1}(do|does|does)[^\w]*( |$) What does idle mean ? -DESCRIPTION ( |^)(enumerate|list out|name|name)[^\w]* (\w+ ){0,1}(the|the)[^\w]* (\w+ ){0,1}(various|various)[^\w]*( |$) Name the various super-teams to which the Angel has belonged . -NUMERIC ( |^)(at|in|in)[^\w]* (\w+ ){0,1}(which|how many|what|what)[^\w]* (\w+ ){0,1}(age|year|year)[^\w]*( |$) In what year did the Bounty mutiny happen ? -ENTITY ( |^)(which|what|what)[^\w]* (\w+ ){0,1}(play|game|movie|book|book)[^\w]*( |$) What book is the follow-up to Future Shock ? -HUMAN ( |^)(who|what|what)[^\w]* ([^\s]+ )*(lives|lives)[^\w]*( |$) What detective lives on Punchbowl Hill and has 11 children ? -ENTITY ( |^)(which|what|what)[^\w]* ([^\s]+ )*(organization|trust|company|company)[^\w]*( |$) What bread company used to feature stickers of the Cisco Kid on the ends of their packages ? -NUMERIC ( |^)(latitude|latitude)[^\w]* ([^\s]+ )*(longitude|longitude)[^\w]*( |$) What is the latitude and longitude of El Paso , Texas ? -HUMAN ( |^)(called|alias|nicknamed|nicknamed)[^\w]*( |$) Who was nicknamed The Little Corporal ? -HUMAN ( |^)(which|who|who)[^\w]* (\w+ ){0,1}(is|will|are|was|was)[^\w]* ([^\s]+ )*(engineer|actor|actress|player|lawyer|model|captain|team|doctor|doctor)[^\w]*( |$) Who was the first doctor to successfully transplant a liver ? -LOCATION ( |^)(where|where)[^\w]*( |$) Where is Kings Canyon ? -NUMERIC ( |^)(by how|how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many people were executed for Abraham Lincoln 's assassination ? -NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(many|many)[^\w]*( |$) How many flavors of ice cream does Howard Johnson 's have ? -LOCATION ( |^)(where|where)[^\w]* (\w+ ){0,1}(was|is|is)[^\w]*( |$) Where is Trinidad ? -ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* ([^\s]+ )*(surname|address|name|name)[^\w]*( |$) What is the name of a Greek god ? -ABBREVIATION ( |^)(what|what)[^\w]* (\w+ ){0,1}(does|does)[^\w]* ([^\s]+ )*(stand for)[^\w]*( |$) What does NASA stand for ? +TREC Question Classification + +# Source +https://github.com/awasthiabhijeet/Learning-From-Rules/tree/master/data/TREC + + +# Labels +Description (DESC) : 0 +Entity (ENTY) : 1 +Human (HUM) : 2 +Abbreviation(ABBR): 3 +Location(LOC) : 4 +Number (NUM): 5} + + +# Label Functions + +68 labeling functions total, as show below. + +ENTITY ( |^)(name|name)[^\w]* (\w+ ){0,1}(a)[^\w]*( |$) Name a canine cartoon character other than Huckleberry Hound to have a voice by Daws Butler . +DESCRIPTION ( |^)(how|how)[^\w]* (\w+ ){0,1}(does|to|can|should|would|could|will|do|do)[^\w]*( |$) How do you throw a housewarming party ? +DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* ([^\s]+ )*(hypertension|hypertension)[^\w]*( |$) What is the medical condition of hypertension ? +LOCATION ( |^)(which|where|what|what)[^\w]* ([^\s]+ )*(near|close to|far|around|surrounds|surrounds)[^\w]*( |$) What ocean surrounds the Madeira Islands ? +HUMAN ( |^)(which|who|what|what)[^\w]* ([^\s]+ )*(person|man|woman|human|poet|poet)[^\w]*( |$) What 2th-century American poet wrote a four-volume biography of Abraham Lincoln ? +ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(.*er|fastener|fastener)[^\w]* ([^\s]+ )*(played|play|run|study |studied|patent|patent)[^\w]*( |$) What fastener did Whitcomb Judson patent in 1893 ? +DESCRIPTION ( |^)(how|how)[^\w]* (\w+ ){0,1}(do|do)[^\w]* (\w+ ){0,1}(you|you)[^\w]*( |$) How do you find out what is allowed to claim as a contibution for income tax purposes ? +HUMAN ( |^)(who|what|what)[^\w]* (\w+ ){0,1}(person|man|woman|human|president|president)[^\w]*( |$) What president also became a supreme court justice ? +NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many hearts does an octopus have ? +LOCATION ( |^)(which|what|where|where)[^\w]* ([^\s]+ )*(situated|located|located)[^\w]*( |$) Where is Microsoft 's corporate headquarters located ? +HUMAN ( |^)(who|who)[^\w]* ([^\s]+ )*(man|woman|human|person|person)[^\w]*( |$) Who is the richest person in the world ? +ENTITY ( |^)(which|what|what)[^\w]* ([^\s]+ )*(team|group|groups|teams|teams)[^\w]*( |$) What 's the most common nickname of U.S. college football teams ? +LOCATION ( |^)(where|where)[^\w]* ([^\s]+ )*(stand|stand)[^\w]*( |$) Where must a soccer goalie stand to be permitted to handle the ball ? +DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(mean|meant|meant)[^\w]*( |$) What is meant by `` capital market '' ? +ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(kind|kind)[^\w]*( |$) What kind of sport is often associated with hooligans ? +NUMERIC ( |^)(what|what)[^\w]* (\w+ ){0,1}(amount|number|percentage|percentage)[^\w]*( |$) What percentage of the body is muscle ? +LOCATION ( |^)(capital|capital)[^\w]* (\w+ ){0,1}(of|of)[^\w]*( |$) What is the capital of Uruguay ? +DESCRIPTION ( |^)(why|why)[^\w]* (\w+ ){0,1}(does|should |shall|could|would|will|can|do|do)[^\w]*( |$) Why do recipe books recommend starting with cold water when you boil something ? +ENTITY ( |^)(composed|made|made)[^\w]* (\w+ ){0,1}(from|through|using|by|of|of)[^\w]*( |$) What was paper made of in the late 16th century ? +LOCATION ( |^)(where|which|what|what)[^\w]* (\w+ ){0,1}(island|island)[^\w]*( |$) What island group is Guadalcanal a part of ? +HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(owner|leads|governs|pays|owns|owns)[^\w]*( |$) Who owns CNN ? +DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* (\w+ ){0,1}(tetrinet|tetrinet)[^\w]*( |$) What is Tetrinet ? +HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(found|discovered|made|built|build|invented|invented)[^\w]*( |$) Who invented volleyball ? +ENTITY ( |^)(what|what)[^\w]* ([^\s]+ )*(called|called)[^\w]*( |$) What are the historical trials following World War II called ? +DESCRIPTION ( |^)(unusual|unusual)[^\w]*( |$) What was unusual about Alexandra 's appearance in Josie and the Pussycats ? +DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(origin|origin)[^\w]*( |$) What is the origin of the term soda jerk ? +LOCATION ( |^)(country|country)[^\w]*( |$) What country lies directly south of Detroit ? +LOCATION ( |^)(where|where)[^\w]*( |$) Where did Wile E. Coyote always get his devices ? +NUMERIC ( |^)(which|what|what)[^\w]* ([^\s]+ )*(time|day|month|hours|minute|seconds|year|date|date)[^\w]*( |$) What was the date of CNN 's first broadcast ? +DESCRIPTION ( |^)(why|why)[^\w]* (\w+ ){0,1}(does|doesn|doesn)[^\w]*( |$) Why doesn 't www.answers.com have any answers to my questions ? +HUMAN ( |^)(queen|king|king)[^\w]*( |$) What king was forced to agree to the Magna Carta ? +NUMERIC ( |^)(year|year)[^\w]*( |$) What year did the United States pass the Copyright law ? +ENTITY ( |^)(novel|novel)[^\w]*( |$) What 1956 Grace Metalious novel was on the best-seller list for two years ? +DESCRIPTION ( |^)(used|used)[^\w]* (\w+ ){0,1}(for|for)[^\w]*( |$) What is the S&P 500 used for ? +NUMERIC ( |^)(when|when)[^\w]* (\w+ ){0,1}(did|do|does|was|was)[^\w]*( |$) When was Yemen reunified ? +DESCRIPTION ( |^)(what|what)[^\w]* (\w+ ){0,1}(kind|kind)[^\w]*( |$) Winnie the Pooh is what kind of animal ? +NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(old|far|long|tall|wide|short|small|close|long|long)[^\w]*( |$) How long would it take to get from Earth to Mars ? +NUMERIC ( |^)(speed|speed)[^\w]*( |$) What is the speed of the Mississippi River ? +ABBREVIATION ( |^)(abbreviation|abbreviation)[^\w]*( |$) CNN is the abbreviation for what ? +NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many visitors go to the Vatican each year ? +NUMERIC ( |^)(what|what)[^\w]* ([^\s]+ )*(percentage|share|number|population|population)[^\w]*( |$) What is the population of Japan ? +DESCRIPTION ( |^)(explain|describe|what|what)[^\w]*( |$) What are the 10 plagues of Egypt ? +LOCATION ( |^)(located|located)[^\w]*( |$) What country is located at 13 degrees North latitude and 10 degrees East longitude ? +ENTITY ( |^)(thing|instance|object|object)[^\w]*( |$) What is a 2-sided object called ? +HUMAN ( |^)(who|who)[^\w]*( |$) Who was the lawyer for Randy Craft ? +ENTITY ( |^)(fear|fear)[^\w]* (\w+ ){0,1}(of|of)[^\w]*( |$) What is a fear of insanity ? +DESCRIPTION ( |^)(explain|describe|how|how)[^\w]* (\w+ ){0,1}(can|can)[^\w]*( |$) How can you be happy ? +HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(worked|lived|guarded|watched|played|ate|slept|portrayed|served|served)[^\w]*( |$) Who served as inspiration for the schoolteacher portrayed by Robin Williams in `` Dead Poets Society '' ? +NUMERIC ( |^)(what|what)[^\w]* (\w+ ){0,1}(part|division|ratio|percentage|percentage)[^\w]*( |$) Of children between the ages of two and eleven , what percentage watch `` The Simpsons '' ? +DESCRIPTION ( |^)(explain|describe|what|what)[^\w]* ([^\s]+ )*(mean|mean)[^\w]*( |$) What does the word terrorism mean ? +DESCRIPTION ( |^)(what|what)[^\w]* ([^\s]+ )*(demands|take|take)[^\w]*( |$) What does it take to become a lawyer ? +HUMAN ( |^)(who|who)[^\w]* (\w+ ){0,1}(is|will|was|was)[^\w]* ([^\s]+ )*(leader|citizen|captain|nationalist|hero|actor|actress|star|gamer|player|lawyer|president|president)[^\w]*( |$) Who was the 1st U.S. President ? +ENTITY ( |^)(name|name)[^\w]*( |$) What other name were the `` Little Rascals '' known as ? +DESCRIPTION ( |^)(how|what|what)[^\w]* (\w+ ){0,1}(do|does|does)[^\w]*( |$) What does idle mean ? +DESCRIPTION ( |^)(enumerate|list out|name|name)[^\w]* (\w+ ){0,1}(the|the)[^\w]* (\w+ ){0,1}(various|various)[^\w]*( |$) Name the various super-teams to which the Angel has belonged . +NUMERIC ( |^)(at|in|in)[^\w]* (\w+ ){0,1}(which|how many|what|what)[^\w]* (\w+ ){0,1}(age|year|year)[^\w]*( |$) In what year did the Bounty mutiny happen ? +ENTITY ( |^)(which|what|what)[^\w]* (\w+ ){0,1}(play|game|movie|book|book)[^\w]*( |$) What book is the follow-up to Future Shock ? +HUMAN ( |^)(who|what|what)[^\w]* ([^\s]+ )*(lives|lives)[^\w]*( |$) What detective lives on Punchbowl Hill and has 11 children ? +ENTITY ( |^)(which|what|what)[^\w]* ([^\s]+ )*(organization|trust|company|company)[^\w]*( |$) What bread company used to feature stickers of the Cisco Kid on the ends of their packages ? +NUMERIC ( |^)(latitude|latitude)[^\w]* ([^\s]+ )*(longitude|longitude)[^\w]*( |$) What is the latitude and longitude of El Paso , Texas ? +HUMAN ( |^)(called|alias|nicknamed|nicknamed)[^\w]*( |$) Who was nicknamed The Little Corporal ? +HUMAN ( |^)(which|who|who)[^\w]* (\w+ ){0,1}(is|will|are|was|was)[^\w]* ([^\s]+ )*(engineer|actor|actress|player|lawyer|model|captain|team|doctor|doctor)[^\w]*( |$) Who was the first doctor to successfully transplant a liver ? +LOCATION ( |^)(where|where)[^\w]*( |$) Where is Kings Canyon ? +NUMERIC ( |^)(by how|how|how)[^\w]* (\w+ ){0,1}(much|many|many)[^\w]*( |$) How many people were executed for Abraham Lincoln 's assassination ? +NUMERIC ( |^)(how|how)[^\w]* (\w+ ){0,1}(many|many)[^\w]*( |$) How many flavors of ice cream does Howard Johnson 's have ? +LOCATION ( |^)(where|where)[^\w]* (\w+ ){0,1}(was|is|is)[^\w]*( |$) Where is Trinidad ? +ENTITY ( |^)(what|what)[^\w]* (\w+ ){0,1}(is|is)[^\w]* ([^\s]+ )*(surname|address|name|name)[^\w]*( |$) What is the name of a Greek god ? +ABBREVIATION ( |^)(what|what)[^\w]* (\w+ ){0,1}(does|does)[^\w]* ([^\s]+ )*(stand for)[^\w]*( |$) What does NASA stand for ? diff --git a/trec/train.json b/trec/train.json index 8a1214a53fb2e64af398f54167c0bdea45858d72..d133660f7525f019ba33e58082c81be2e54d14b8 100644 --- a/trec/train.json +++ b/trec/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92a1cfc914222003512efd69ee55bd89150bf42f35400c1325f861bfe2a0e350 -size 1926230 +oid sha256:dd34c1d0e09e07718df19fe07b18456bc8846d7189d3e89d0616a78ba60bd326 +size 1900377 diff --git a/wikigold/test.json b/wikigold/test.json index fcbe41060baf7102b83baffcfc82047198b9ffae..ab64b7b4ca1395c10a1cf31cec4b010911650fc9 100644 --- a/wikigold/test.json +++ b/wikigold/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce60e7f0b513eea29116a70147aa51fbd72b2dd4b26176ea8f7f14c97277f14c -size 384013 +oid sha256:fa3bc543f5cc1d817f1511fdec777312365e81b8740a8b2b3c7c79958a8793e7 +size 979895 diff --git a/wikigold/train.json b/wikigold/train.json index c8f1f3f11748d7e725d535cfe2b463ad138b7155..240cc66282963b1cbfbd0d9c1b339680d9a1ac69 100644 --- a/wikigold/train.json +++ b/wikigold/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bd9ef11adcd8336b89c913dc26310b75e6622c27d4e3f4cf3f10a1d11957920 -size 3208094 +oid sha256:e890124da8e69c115fcfb88b40d8f972e791e9efb1fd76b4532c7b6d1894da84 +size 8203269 diff --git a/wikigold/valid.json b/wikigold/valid.json index b38dff4b35eeb2d9c0dd8271d25d2bf97eb9c390..3548bf1a8b90146ad0911ee676ec068888791ce9 100644 --- a/wikigold/valid.json +++ b/wikigold/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1924a30de945e49061656ead4ad15b2406f9bad4ed29b1d851c6412b4a92e2c -size 375751 +oid sha256:15c9729af8e95c087dd2c9bddcaca26a2a6e51663868921ce2336c875a5c7193 +size 959256 diff --git a/wrench.py b/wrench.py index 5939c8aa5cc25f1156a4de9f84028d845c11dccf..f9761bb46ff3c32b5eed85a5dac0030607c4dbaa 100644 --- a/wrench.py +++ b/wrench.py @@ -22,87 +22,115 @@ class WrenchConfig(datasets.BuilderConfig): class Wrench(datasets.GeneratorBasedBuilder): """WRENCH classification dataset.""" + BUILDER_DICT = [ + { + "name": "imdb", + "dataset_path": "./imdb", + }, + { + "name": "yelp", + "dataset_path": "./yelp", + }, + { + "name": "youtube", + "dataset_path": "./youtube", + }, + { + "name": "sms", + "dataset_path": "./sms", + }, + { + "name": "trec", + "dataset_path": "./trec", + }, + { + "name": "cdr", + "dataset_path": "./cdr", + }, + { + "name": "semeval", + "dataset_path": "./semeval", + }, + { + "name": "Bioresponse", + "dataset_path": "./Bioresponse", + }, + { + "name": "wikigold", + "dataset_path": "./wikigold", + }, + { + "name": "PhishingWebsites", + "dataset_path": "./PhishingWebsites", + }, + { + "name": "bank-marketing", + "dataset_path": "./bank-marketing", + }, + { + "name": "spambase", + "dataset_path": "./spambase", + }, + { + "name": "mit-movie", + "dataset_path": "./mit-movie", + }, + { + "name": "basketball", + "dataset_path": "./basketball", + }, + { + "name": "agnews", + "dataset_path": "./agnews", + }, + { + "name": "commercial", + "dataset_path": "./commercial", + }, + { + "name": "spouse", + "dataset_path": "./spouse", + }, + { + "name": "mit-restaurant", + "dataset_path": "./mit-restaurant", + }, + { + "name": "conll", + "dataset_path": "./conll", + }, + { + "name": "chemprot", + "dataset_path": "./chemprot", + }, + { + "name": "ncbi-diseas", + "dataset_path": "./ncbi-diseas", + }, + { + "name": "bc5cdr", + "dataset_path": "./bc5cdr", + }, + { + "name": "mushroom", + "dataset_path": "./mushroom", + }, + { + "name": "laptopreview", + "dataset_path": "./laptopreview", + }, + { + "name": "census", + "dataset_path": "./census", + }, + { + "name": "tennis", + "dataset_path": "./tennis", + }, + ] BUILDER_CONFIGS = [ - WrenchConfig( - name="chemprot", - dataset_path="./chemprot", - ), - WrenchConfig( - name="Bioresponse", - dataset_path="./Bioresponse", - ), - WrenchConfig( - name="wikigold", - dataset_path="./wikigold", - ), - WrenchConfig( - name="PhishingWebsites", - dataset_path="./PhishingWebsites", - ), - WrenchConfig( - name="bank-marketing", - dataset_path="./bank-marketing", - ), - WrenchConfig( - name="spambase", - dataset_path="./spambase", - ), - WrenchConfig( - name="mit-movie", - dataset_path="./mit-movie", - ), - WrenchConfig( - name="basketball", - dataset_path="./basketball", - ), - WrenchConfig( - name="agnews", - dataset_path="./agnews", - ), - WrenchConfig( - name="commercial", - dataset_path="./commercial", - ), - WrenchConfig( - name="spouse", - dataset_path="./spouse", - ), - WrenchConfig( - name="mit-restaurant", - dataset_path="./mit-restaurant", - ), - WrenchConfig( - name="conll", - dataset_path="./conll", - ), - WrenchConfig( - name="chemprot", - dataset_path="./chemprot", - ), - WrenchConfig( - name="ncbi-diseas", - dataset_path="./ncbi-diseas", - ), - WrenchConfig( - name="bc5cdr", - dataset_path="./bc5cdr", - ), - WrenchConfig( - name="mushroom", - dataset_path="./mushroom", - ), - WrenchConfig( - name="laptopreview", - dataset_path="./laptopreview", - ), - WrenchConfig( - name="census", - dataset_path="./census", - ), - WrenchConfig( - name="tennis", - dataset_path="./tennis", - ), + WrenchConfig(name=i["name"], dataset_path=i["dataset_path"]) + for i in BUILDER_DICT ] def _info(self): @@ -135,19 +163,23 @@ class Wrench(datasets.GeneratorBasedBuilder): def _generate_examples(self, filepath): """Generate Custom examples.""" + print(f"\n\n\n{filepath}\n\n\n\n\n\n\n") with open(filepath, encoding="utf-8") as f: json_data = json.load(f) + print("\n\n", json_data, "\n\n") - for idx in json_data: - data = json_data[idx] + list_of_dicts = [dict(key=key, **value) for key, value in json_data.items()] + print("\n\n", list_of_dicts, "\n\n") + for idx in list_of_dicts: + data = json_data[idx] - text = data["data"]["text"] - weak_labels = data["weak_labels"] - label = data["label"] + text = data["data"]["text"] + weak_labels = data["weak_labels"] + label = data["label"] - yield int(idx), { - "text": text, - "label": label, - "weak_labels": weak_labels, - } + yield int(idx), { + "text": text, + "label": label, + "weak_labels": weak_labels, + } diff --git a/yelp/readme.txt b/yelp/readme.txt index f34c5ad47860feaefb0f19c9a5ad20b2605ba33a..071d331ce338875cdeb513aa2f723ace72c2d4f6 100644 --- a/yelp/readme.txt +++ b/yelp/readme.txt @@ -1,102 +1,102 @@ -Yelp Sentiment Classification -https://github.com/weakrules/Denoise-multi-weak-sources/tree/master/rules-noisy-labels/Yelp - - -# Labels - -"0": "Negative", -"1": "Positive" - - -# Labeling functions - -lfs = [ - textblob_lf, - keyword_recommend, - keyword_general, - keyword_mood, - keyword_service, - keyword_price, - keyword_environment, - keyword_food, -] - - - -# lf - textblob_lf - -@preprocessor(memoize=True) -def textblob_sentiment(x): - scores = TextBlob(x.text) - x.polarity = scores.sentiment.polarity - x.subjectivity = scores.sentiment.subjectivity - return x - -@labeling_function(pre=[textblob_sentiment]) -def textblob_lf(x): - if x.polarity < -0.5: - return NEG - if x.polarity > 0.5: - return POS - return ABSTAIN - - - -# lf - keyword_recommend - -keyword_recommend = make_keyword_lf(name="keyword_recommend", - keywords_pos=["recommend"], - keywords_neg=[]) - - - -# lf - keyword_general - -keyword_general = make_keyword_lf(name="keyword_general", - keywords_pos=["outstanding", "perfect", "great", "good", "nice", "best", "excellent", "worthy", "awesome", "enjoy", "positive", "pleasant", "wonderful", "amazing"], - keywords_neg=["bad", "worst", "horrible", "awful", "terrible", "nasty", "shit", "distasteful", "dreadful", "negative"]) - - - -# lf - keyword_mood - -keyword_mood = make_keyword_lf(name="keyword_mood", - keywords_pos=["happy", "pleased", "delighted", "contented", "glad", "thankful", "satisfied"], - keywords_neg=["sad", "annoy", "disappointed", "frustrated", "upset", "irritated", "harassed", "angry", "pissed"]) - - - -# lf - keyword_service - -keyword_service = make_keyword_lf(name="keyword_service", - keywords_pos=["friendly", "patient", "considerate", "enthusiastic", "attentive", "thoughtful", "kind", "caring", "helpful", "polite", "efficient", "prompt"], - keywords_neg=["slow", "offended", "rude", "indifferent", "arrogant"]) - - - -# lf - keyword_price - -keyword_price = make_keyword_lf(name="keyword_price", - keywords_pos=["cheap", "reasonable", "inexpensive", "economical"], - keywords_neg=["overpriced", "expensive", "costly", "high-priced"]) - - - - -# lf - keyword_environment - -keyword_environment = make_keyword_lf(name="keyword_environment", - keywords_pos=["clean", "neat", "quiet", "comfortable", "convenien", "tidy", "orderly", "cosy", "homely"], - keywords_neg=["noisy", "mess", "chaos", "dirty", "foul"]) - - - -# lf - keyword_food - -keyword_food = make_keyword_lf(name="keyword_food", - keywords_pos=["tasty", "yummy", "delicious", "appetizing", "good-tasting", "delectable", "savoury", "luscious", "palatable"], - keywords_neg=["disgusting", "gross", "insipid"]) - - - - +Yelp Sentiment Classification +https://github.com/weakrules/Denoise-multi-weak-sources/tree/master/rules-noisy-labels/Yelp + + +# Labels + +"0": "Negative", +"1": "Positive" + + +# Labeling functions + +lfs = [ + textblob_lf, + keyword_recommend, + keyword_general, + keyword_mood, + keyword_service, + keyword_price, + keyword_environment, + keyword_food, +] + + + +# lf - textblob_lf + +@preprocessor(memoize=True) +def textblob_sentiment(x): + scores = TextBlob(x.text) + x.polarity = scores.sentiment.polarity + x.subjectivity = scores.sentiment.subjectivity + return x + +@labeling_function(pre=[textblob_sentiment]) +def textblob_lf(x): + if x.polarity < -0.5: + return NEG + if x.polarity > 0.5: + return POS + return ABSTAIN + + + +# lf - keyword_recommend + +keyword_recommend = make_keyword_lf(name="keyword_recommend", + keywords_pos=["recommend"], + keywords_neg=[]) + + + +# lf - keyword_general + +keyword_general = make_keyword_lf(name="keyword_general", + keywords_pos=["outstanding", "perfect", "great", "good", "nice", "best", "excellent", "worthy", "awesome", "enjoy", "positive", "pleasant", "wonderful", "amazing"], + keywords_neg=["bad", "worst", "horrible", "awful", "terrible", "nasty", "shit", "distasteful", "dreadful", "negative"]) + + + +# lf - keyword_mood + +keyword_mood = make_keyword_lf(name="keyword_mood", + keywords_pos=["happy", "pleased", "delighted", "contented", "glad", "thankful", "satisfied"], + keywords_neg=["sad", "annoy", "disappointed", "frustrated", "upset", "irritated", "harassed", "angry", "pissed"]) + + + +# lf - keyword_service + +keyword_service = make_keyword_lf(name="keyword_service", + keywords_pos=["friendly", "patient", "considerate", "enthusiastic", "attentive", "thoughtful", "kind", "caring", "helpful", "polite", "efficient", "prompt"], + keywords_neg=["slow", "offended", "rude", "indifferent", "arrogant"]) + + + +# lf - keyword_price + +keyword_price = make_keyword_lf(name="keyword_price", + keywords_pos=["cheap", "reasonable", "inexpensive", "economical"], + keywords_neg=["overpriced", "expensive", "costly", "high-priced"]) + + + + +# lf - keyword_environment + +keyword_environment = make_keyword_lf(name="keyword_environment", + keywords_pos=["clean", "neat", "quiet", "comfortable", "convenien", "tidy", "orderly", "cosy", "homely"], + keywords_neg=["noisy", "mess", "chaos", "dirty", "foul"]) + + + +# lf - keyword_food + +keyword_food = make_keyword_lf(name="keyword_food", + keywords_pos=["tasty", "yummy", "delicious", "appetizing", "good-tasting", "delectable", "savoury", "luscious", "palatable"], + keywords_neg=["disgusting", "gross", "insipid"]) + + + + diff --git a/yelp/test.json b/yelp/test.json index 052ef13265a92fcb91d5d957829f07cc2b7ea50e..21cc86ae70ab5bcf241be91d9bb214755fdf7a93 100644 --- a/yelp/test.json +++ b/yelp/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f53e11f520881fa339ed9eba0f6e5a5a63549f7f3cf4e267cc832eb0e2c0f09 -size 3016445 +oid sha256:0cd1970748319b1ce81ad6376285870986a5e6fe75ada7db5b8e015abdb10d71 +size 3628245 diff --git a/yelp/train.json b/yelp/train.json index 2736549c3eb730339ecc44f2b7fca2da32714c4e..d1cda114e925618c87095223b126c48f3dba360c 100644 --- a/yelp/train.json +++ b/yelp/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91420e26dc8ab12de7fec32602d9082778ee6fcf107546e2b7f1bee1c4741801 -size 25088445 +oid sha256:d6d48629dd2ca701b8ffea84ffbef801606d03d846ce3b3d270d06797e568932 +size 29982845 diff --git a/yelp/valid.json b/yelp/valid.json index e501d61be10d8aab75c740c6a3b648075f779c0d..cf842b5d914073c9691cb76df7bfc6e59f68a727 100644 --- a/yelp/valid.json +++ b/yelp/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8e9583d4e4b60f22c76d530b84ec6a678fee05760eb8cf5ff7e2b98dfab7c47 -size 3133164 +oid sha256:a712974bc5ff361b757bbbcf65e6c5182eb9ed5ce8ea7ea7ff567dc75e0ddd59 +size 3744964 diff --git a/youtube/labeled_ids.json b/youtube/labeled_ids.json deleted file mode 100644 index d0b9937e489c63ab1a0bcd4941bcf36c61350030..0000000000000000000000000000000000000000 --- a/youtube/labeled_ids.json +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b338be1717f640901a6826d2e1cb0ab6b53d71d200ef8a9429de31a219c65c12 -size 844 diff --git a/youtube/test.json b/youtube/test.json index 8daaf7f3304fb8c473c2ccb76b329037c3ea4a0c..cf16be3fcc10c4d6b717158214ce00f3ca9a3b8e 100644 --- a/youtube/test.json +++ b/youtube/test.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef04412aee047657e41d7ad1411f11d05fce13b642bf1bec8897d138343ee12d -size 54233 +oid sha256:abcadb6e0a81d1b1a1f19ad6acb73fd201288fae3e89d88593fae9cbca4d5a21 +size 100483 diff --git a/youtube/train.json b/youtube/train.json index 216dd267cff1cb2c9e0f02cf811501710aad8e4c..f7c2711ea7709b9e07507e8385718fef35278a60 100644 --- a/youtube/train.json +++ b/youtube/train.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c487acf4e3e16b340e28f3633d5613f83c4db2d3b287e4341c86ff8f2192705 -size 340275 +oid sha256:a435c4e6853c95ac8bdc6bcf9e01d4bad39aa8e5713d273ed01aa5edbfc215b8 +size 612314 diff --git a/youtube/valid.json b/youtube/valid.json index 6d8b2fe5c580669a83a27ae7762891029d333f15..01ca606d2c6dac1bfe5bceffefaa324eefa564ae 100644 --- a/youtube/valid.json +++ b/youtube/valid.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01d28d71c48e34bdde0566a9eead1d9694baa4eae176cea6d979bb59c4516df3 -size 24497 +oid sha256:278b947d748b4b921b2dd60918318f7ee817584d85a719d0db6f5365d6e87b01 +size 46697