{"id":820,"date":"2026-10-06T19:37:50","date_gmt":"2026-10-06T17:37:50","guid":{"rendered":"https:\/\/pnicoli.me\/?p=820"},"modified":"2026-10-06T19:37:50","modified_gmt":"2026-10-06T17:37:50","slug":"sweat","status":"publish","type":"post","link":"https:\/\/pnicoli.me\/?p=820","title":{"rendered":"SWEAT"},"content":{"rendered":"\n<h1 id=\"sliced-word-embeddings-association-test\" class=\"wp-block-heading\">Sliced Word Embeddings Association Test<\/h1>\n\n\n\n<p id=\"gspb_text-id-gsbp-bb302ed\" class=\"gspb_text gspb_text-id-gsbp-bb302ed \">The Sliced Word Embedding Association Test (SWEAT) is a statistical measure of relative semantic polarization for pairs of textual corpora.<br><br>The measure relies on aligned distributional representations for the elements of each corpora vocabulary, specifically aligned Word2Vec gensim models such as those obtained through CADE are assumed in this implementation. While any pair of Word2Vec models can be used, alignment is necessary to ensure that the two distributional representations are comparable.<br><br>The SWEAT is an extension of the Word Embedding Association Test (WEAT) proposed by Caliskan et al. (2017): while the WEAT measured the comparative polarization for a pair of topical wordsets (e.g. insects and flowers) against a pair of attribute wordsets (e.g. pleasant and unpleasant) in a single-corpus distributional model (e.g. 1950 american newspaper articles) the SWEAT measures the relative polarization for a single topical wordset (e.g. parenting) against a pair of stable attribute wordsets (e.g. positive and negative sentiment valence) in a pair of aligned distributional models from two different corpora (e.g. r\/childfree and r\/BabyBumps).<\/p>\n\n\n\n<div class=\"gspb_button_wrapper gspb_button-id-gsbp-749aa5b\" id=\"gspb_button-id-gsbp-749aa5b\"><a class=\"wp-block-greenshift-blocks-buttonbox gspb-buttonbox wp-element-button\" href=\"https:\/\/github.com\/pscrapy\/SWEAT\" target=\"_blank\" rel=\"noopener\"><span class=\"gspb-buttonbox-textwrap\"><span class=\"gspb-buttonbox-icon\"><svg class=\"\" style=\"display:inline-block;vertical-align:middle\" width=\"15\" height=\"15\" viewBox=\"0 0 1024 1024\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path style=\"fill:#565D66\" d=\"M923.8 0c-11.46 0-23.18 2.2-34.78 7.040l-831.54 383.78c-95.94 44.78-63.96 185.5 38.38 185.5h351.82v351.82c0 60.020 48.42 95.86 97.48 95.86 34.6 0 69.5-17.8 88.020-57.48l383.8-831.56c27.14-65.18-28.7-134.96-93.18-134.96zM958.9 108.16l-383.7 831.32c-6.36 13.64-16.48 20.56-30.060 20.56-11.6 0-33.52-6.66-33.52-31.88v-415.8h-415.76c-22.9 0-29.28-17.66-30.98-25.26-2.2-9.86-2.54-27.96 19.4-38.2l829.36-382.82c3.42-1.42 6.74-2.1 10.18-2.1 10.84 0 22.98 7.3 30.22 18.16 4.38 6.58 8.64 16.82 4.86 26.020z\"><\/path><\/svg><\/span><span class=\"gspb-buttonbox-text\"><span class=\"gspb-buttonbox-title\">Learn more on Github<\/span><\/span><\/span><\/a><\/div>\n\n\n\n<div class=\"wp-block-greenshift-blocks-image gspb_image gspb_image-id-gsbp-aade24e\" id=\"gspb_image-id-gsbp-aade24e\"><img decoding=\"async\" src=\"http:\/\/pnicoli.me\/wp-content\/uploads\/2026\/10\/plot_details.png\" data-src=\"\" alt=\"\" loading=\"lazy\" width=\"747\" height=\"496\"\/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sliced Word Embeddings Association Test<\/p>\n","protected":false},"author":1,"featured_media":792,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"yes","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"10","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_gspb_post_css":".gspb_text-id-gsbp-bb302ed{margin-top:0!important}#gspb_button-id-gsbp-749aa5b{display:flex;justify-content:flex-start}#gspb_button-id-gsbp-749aa5b .gspb-buttonbox-text{display:flex;flex-direction:column}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox{box-sizing:border-box}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox>.gspb-buttonbox-textwrap>.gspb-buttonbox-icon{display:flex}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox .gspb-buttonbox-icon svg,#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox .gspb-buttonbox-icon svg path,#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox:hover .gspb-buttonbox-icon svg,#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox:hover .gspb-buttonbox-icon svg path{fill:var(--wp--preset--color--palette-color-8, var(--theme-palette-color-8, #ffffff))!important}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox .gspb-buttonbox-icon svg{margin:0!important}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox>.gspb-buttonbox-textwrap{display:flex;flex-direction:row;align-items:center}#gspb_button-id-gsbp-749aa5b .gspb-buttonbox-icon{margin-right:13px}#gspb_button-id-gsbp-749aa5b>.gspb-buttonbox{margin-top:0}#gspb_image-id-gsbp-aade24e img{vertical-align:top;display:inline-block;box-sizing:border-box;max-width:100%;height:auto}","footnotes":""},"categories":[10,12],"tags":[],"class_list":["post-820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","category-python"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pnicoli.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=820"}],"version-history":[{"count":1,"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions"}],"predecessor-version":[{"id":822,"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions\/822"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pnicoli.me\/index.php?rest_route=\/wp\/v2\/media\/792"}],"wp:attachment":[{"href":"https:\/\/pnicoli.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pnicoli.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pnicoli.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}