<snapdata remixID="8378586"><project name="word analogy" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAnpJREFUeF7t17Fpw1AARdFv7WJN4EVcawrPJZeeR3u4kiGQkCYJaXxBHLUSPHT/AaHTvu/7cCkQFTgBGJU3+1EAQBDSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBAH/If7lcxu12G8uypAd09HEAfznh6/X6dXfbtnG/38f5fD66ibe+H4B/5P6O8PPRaZrG8/kcj8fjrYd1xDEAAUxdA/iPT/C6rmOe5/TAjjYOoJ+Q1DSAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmNw4gA2kBANP8xgFkIC0AYJrfOIAMpAUATPMbB5CBtACAaX7jADKQFgAwzW8cQAbSAgCm+Y0DyEBaAMA0v3EAGUgLAJjmN/4C1wn8qIbHiI0AAAAASUVORK5CYII=</thumbnail><scenes select="1"><scene name="word analogy"><notes></notes><hidden></hidden><headers></headers><code></code><blocks><block-definition s="Open this in a new tab" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>re_open_full_window</l><list></list></custom-block></script></block-definition><block-definition s="closest word to %&apos;features&apos; $nl in language %&apos;language&apos; $nl not including %&apos;exceptions&apos;" type="reporter" category="variables"><comment x="0" y="0" w="328.5714285714286" collapsed="false">Reports the word that is closest to the features.  You can choose from among 15 languages or leave it blank for the default language. There is a full-featured version of this block as well.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%txt"><options>Chinese&#xD;&#xD;English&#xD;&#xD;Finnish&#xD;&#xD;French&#xD;&#xD;German&#xD;&#xD;Greek&#xD;&#xD;Hindi&#xD;&#xD;Indonesian&#xD;&#xD;Italian&#xD;&#xD;Japanese&#xD;Lithuanian&#xD;&#xD;Portuguese&#xD;&#xD;Sinhalese&#xD;&#xD;Spanish&#xD;&#xD;Swedish</options></input><input type="%l"></input></inputs><script><custom-block s="Load eCraft2Learn library"></custom-block><custom-block s="wait for word embeddings in language %txt %br or use this word embeddings url %txt"><block var="language"/><l></l></custom-block><block s="doReport"><custom-block s="call eCraft2Learn reporter %txt with %mult%s"><l>closest_word</l><list><block var="features"/><block var="exceptions"/><l></l><l>Cosine similarity</l><block var="language"/></list></custom-block></block></script></block-definition><block-definition s="wait for word embeddings in language %&apos;language&apos; $nl or use this word embeddings url %&apos;url&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"><options>Chinese&#xD;&#xD;English&#xD;&#xD;Finnish&#xD;&#xD;French&#xD;&#xD;German&#xD;&#xD;Greek&#xD;&#xD;Hindi&#xD;&#xD;Indonesian&#xD;&#xD;Italian&#xD;&#xD;Japanese&#xD;&#xD;Portuguese&#xD;&#xD;Sinhalese&#xD;&#xD;Swedish</options></input><input type="%txt"></input></inputs><script><block s="doDeclareVariables"><list><l>loaded</l></list></block><block s="doSetVar"><l>loaded</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="Load words to features in language %txt then %cmdRing %br use this URL instead of default %txt"><block var="language"/><block s="reifyScript"><script><block s="doSetVar"><l>loaded</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block var="url"/></custom-block><block s="doWaitUntil"><block var="loaded"/></block></script></block-definition><block-definition s="Load words to features in language %&apos;language&apos; then %&apos;do when loaded&apos; $nl use this URL instead of default %&apos;url&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"><options>Chinese&#xD;&#xD;English&#xD;&#xD;Finnish&#xD;&#xD;French&#xD;&#xD;German&#xD;&#xD;Greek&#xD;&#xD;Hindi&#xD;&#xD;Indonesian&#xD;&#xD;Italian&#xD;&#xD;Japanese&#xD;&#xD;Portuguese&#xD;&#xD;Sinhalese&#xD;&#xD;Swedish</options></input><input type="%cmdRing"></input><input type="%txt"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>word_embeddings_ready</l><list><block var="language"/><block var="do when loaded"/><block var="url"/></list></custom-block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;value&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="value"/></block></script></block-definition><block-definition s="features of word %&apos;word&apos; in language %&apos;language&apos;" type="reporter" category="variables"><comment x="0" y="0" w="343.5714285714286" collapsed="false">Reports a list of 300 numbers that &quot;describes&quot; the word. You can choose among 15 languages or leave it blank and use the default language. &#xD;To learn about these numbers see https://en.wikipedia.org/wiki/Word_embedding</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%txt"><options>Chinese&#xD;English&#xD;Finnish&#xD;French&#xD;German&#xD;Greek&#xD;Hindi&#xD;Indonesian&#xD;Italian&#xD;Japanese&#xD;Lithuanian&#xD;Portuguese&#xD;Sinhalese&#xD;Spanish&#xD;Swedish</options></input></inputs><script><custom-block s="Load eCraft2Learn library"></custom-block><custom-block s="wait for word embeddings in language %txt %br or use this word embeddings url %txt"><block var="language"/><l></l></custom-block><block s="doReport"><custom-block s="call eCraft2Learn reporter %txt with %mult%s"><l>word_to_features</l><list><block var="word"/><block var="language"/></list></custom-block></block></script></block-definition><block-definition s="load eCraft2Learn" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>https://ecraft2learn.github.io/ai/ecraft2learn.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>https://ecraft2learn.github.io/ai/js/ecraft2learn_snap_extension.js</l></list></block></script></block-definition><block-definition s="call eCraft2Learn reporter %&apos;reporter name&apos; with %&apos;inputs&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><custom-block s="load eCraft2Learn"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>e2l_call(reporter_name, parameters)</l><list><block var="reporter name"/><block var="inputs"/></list></block></block></script></block-definition><block-definition s="run eCraft2Learn command %&apos;command name&apos; with %&apos;inputs&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><custom-block s="load eCraft2Learn"></custom-block><block s="doApplyExtension"><l>e2l_run(command_name, parameters)</l><list><block var="command name"/><block var="inputs"/></list></block></script></block-definition><block-definition s="Load eCraft2Learn library" type="command" category="other"><comment x="0" y="0" w="238.57142857142858" collapsed="false">No longer needed in Snap! 7+ but retained to avoid error from blocks that expect it.</comment><header></header><code></code><translations></translations><inputs></inputs></block-definition></blocks><stage width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="116"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="117"></list></costumes><sounds><list struct="atomic" id="118"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="123"><costumes><list struct="atomic" id="124"></list></costumes><sounds><list struct="atomic" id="125"></list></sounds><blocks></blocks><variables></variables><scripts><comment x="36.42857142857145" y="12.142857142857082" w="328.5714285714286" collapsed="true">Finding out what word is closest to (king+(woman-man))</comment><script x="36.42857142857145" y="38.285714285713205"><custom-block s="let %upvar be %s"><l>female essence</l><block s="reportDifference"><custom-block s="features of word %txt in language %txt"><l>woman</l><l>English</l></custom-block><custom-block s="features of word %txt in language %txt"><l>man</l><l>English</l></custom-block></block></custom-block><block s="doReport"><custom-block s="closest word to %l %br in language %txt %br not including %l"><block s="reportSum"><custom-block s="features of word %txt in language %txt"><l>king</l><l>English</l></custom-block><block var="female essence"/></block><l>English</l><block s="reportNewList"><list><l>king</l></list></block></custom-block></block></script><script x="397" y="10"><custom-block s="Open this in a new tab"></custom-block></script><comment x="27.714285714285722" y="180.1428571428571" w="328.5714285714286" collapsed="true">Is the same as (woman+(king-man))</comment><script x="39.14285714285713" y="222.99999999999898"><custom-block s="let %upvar be %s"><l>royalty essence</l><block s="reportDifference"><custom-block s="features of word %txt in language %txt"><l>king</l><l>English</l></custom-block><custom-block s="features of word %txt in language %txt"><l>man</l><l>English</l></custom-block></block></custom-block><block s="doReport"><custom-block s="closest word to %l %br in language %txt %br not including %l"><block s="reportSum"><custom-block s="features of word %txt in language %txt"><l>woman</l><l>English</l></custom-block><block var="royalty essence"/></block><l>English</l><block s="reportNewList"><list><l>king</l></list></block></custom-block></block></script></scripts></sprite></sprites></stage><variables></variables></scene></scenes></project><media name="word analogy" app="Snap! 7, https://snap.berkeley.edu" version="2"></media></snapdata>