<project name="eCraft2Learn" app="iSnap 2.1, http://go.ncsu.edu/isnap" version="1" guid="2e3a967b-8258-4218-a780-6919d35511d9" assignment=""><data>{}</data><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAA1xJREFUeF7t2L9KlXEcx/HvkydJEGoQo6CGBOkPRdg5BmWZiyIJttShqSGri+guIqcox+6hoaGhWsKhrkAEtxIaD/gEBtFQo35AX88FPJ/f780LnsNp2rZty6NAqEADYKi82d0CAIIQLQBgNL9xABmIFgAwmt84gAxECwAYzW8cQAaiBQCM5jcOIAPRAgBG8xsHkIFoAQCj+Y0DyEC0AIDR/MYBZCBaAMBofuMAMhAtAGA0v3EAGYgWADCa3ziADEQLABjNbxxABqIFAIzmNw4gA9ECAEbzGweQgWgBAKP5jQPIQLQAgNH8xgFkIFoAwGh+483KyvP2aKdb3e6gHvQXa3R0VBUF9q1AMxgM2u7Uy/r29VRVfa/zF37U8r2LdWdurGZmrtXIyMi+HcbQ4Suw+wne2Nisqatva/vH2b8K7NTw8Fb1rg/X/PyZml84Xb1e7/AVcuM9LfDnN+DnT+t188bHamrsv4Odo+vV71+p2bmdevToYQ0NDe3p4bz84Bf4A/DZ0xf1+tXJf964rc2anR2t2bmxWlw8V1NTl6vT6Rz8Om645wV2Aa69eVdPHm9V1bHfg833mpz8WXeXLlVvelD37y9X0zR7fhgDh69A8+HDl3bu9vs6fmK7+v1edaeP1NLS9RofHz98Ndx43ws0q6tr7cLCrZqYmNj3cYMK+COagWgBAKP5jQPIQLQAgNH8xgFkIFoAwGh+4wAyEC0AYDS/cQAZiBYAMJrfOIAMRAsAGM1vHEAGogUAjOY3DiAD0QIARvMbB5CBaAEAo/mNA8hAtACA0fzGAWQgWgDAaH7jADIQLQBgNL9xABmIFgAwmt84gAxECwAYzW8cQAaiBQCM5jcOIAPRAgBG8xsHkIFoAQCj+Y0DyEC0AIDR/MYBZCBaAMBofuMAMhAtAGA0v3EAGYgWADCa3ziADEQLABjNbxxABqIFAIzmNw4gA9ECAEbzGweQgWgBAKP5jQPIQLQAgNH8xgFkIFoAwGh+4wAyEC0AYDS/cQAZiBYAMJrfOIAMRAsAGM1vHEAGogUAjOY3DiAD0QIARvMbB5CBaAEAo/mNA8hAtACA0fzGAWQgWgDAaH7jADIQLQBgNL9xABmIFgAwmt84gAxECwAYzW8cQAaiBQCM5jf+C0FSDLfFDoGGAAAAAElFTkSuQmCC</thumbnail><stage name="Stage" guid="2e3a967b-8258-4218-a780-6919d35511d9" width="360" height="270" costume="0" tempo="60" threadsafe="false" lines="round" ternary="true" codify="false" inheritance="false" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAEOCAYAAACkSI2SAAAAAXNSR0IArs4c6QAACP9JREFUeF7t1EENAAAMArHh3/Rs3KNTQMrCzhEgQIBAUmDJVEIRIECAwBloT0CAAIGogIGOFiMWAQIEDLQfIECAQFTAQEeLEYsAAQIG2g8QIEAgKmCgo8WIRYAAAQPtBwgQIBAVMNDRYsQiQICAgfYDBAgQiAoY6GgxYhEgQMBA+wECBAhEBQx0tBixCBAgYKD9AAECBKICBjpajFgECBAw0H6AAAECUQEDHS1GLAIECBhoP0CAAIGogIGOFiMWAQIEDLQfIECAQFTAQEeLEYsAAQIG2g8QIEAgKmCgo8WIRYAAAQPtBwgQIBAVMNDRYsQiQICAgfYDBAgQiAoY6GgxYhEgQMBA+wECBAhEBQx0tBixCBAgYKD9AAECBKICBjpajFgECBAw0H6AAAECUQEDHS1GLAIECBhoP0CAAIGogIGOFiMWAQIEDLQfIECAQFTAQEeLEYsAAQIG2g8QIEAgKmCgo8WIRYAAAQPtBwgQIBAVMNDRYsQiQICAgfYDBAgQiAoY6GgxYhEgQMBA+wECBAhEBQx0tBixCBAgYKD9AAECBKICBjpajFgECBAw0H6AAAECUQEDHS1GLAIECBhoP0CAAIGogIGOFiMWAQIEDLQ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2g8QIEAgKmCgo8WIRYAAAQPtBwgQIBAVMNDRYsQiQICAgfYDBAgQiAoY6GgxYhEgQMBA+wECBAhEBQx0tBixCBAgYKD9AAECBKICBjpajFgECBAw0H6AAAECUQEDHS1GLAIECBhoP0CAAIGogIGOFiMWAQIEDLQfIECAQFTAQEeLEYsAAQIG2g8QIEAgKmCgo8WIRYAAAQPtBwgQIBAVMNDRYsQiQICAgfYDBAgQiAoY6GgxYhEgQMBA+wECBAhEBQx0tBixCBAg8IzNAQ9aLxEbAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Examples" idx="1" x="-150" y="50" heading="90" scale="1" rotation="1" draggable="true" costume="0" color="3.000000000000064,0,168" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><comment x="20" y="20" w="639.9999999999999" collapsed="true"> Task 1. Being familiar with Snap!</comment><comment x="20" y="52" w="640.9999999999999" collapsed="false">This task will help you to learn about the programming environment. You can explore it by yourself under the guidance of reference manuals. For example, please try to select the “average” item under the “Variables” category and see what happened in the Stage region.</comment><comment x="20" y="118" w="637.9999999999999" collapsed="true"> Task 2. NLP training using word embedding</comment><comment x="20" y="150" w="640.9999999999999" collapsed="false">Word embedding is a popular method to translate the human language into a language that machines can be recognized and processed. It first constructs a set of features from the text for each word, and then do distributed representations of that set of features. Here, we have provided training text which placing the word in a 300-dimensional space (i.e., the word will be reported in a list of 300 numbers).</comment><comment x="20" y="228" w="641.4285714285713" collapsed="true">Task 2-1. Generate a vector for  &quot;cat&quot; and visualize it</comment><comment x="20" y="260" w="640.9999999999999" collapsed="false">Please combine some blocks to generate a vector for &quot;cat&quot; and visualize it. The followings are some necessary blocks and an example to generate the vector for a word. Show your program below.</comment><script x="20" y="326"><custom-block id="2451" s="features of %txt in language %txt"><l>dog</l><l>English</l>undefined</custom-block></script><script x="20" y="359"><block id="654280" s="clear"></block><block id="654365" s="gotoXY"><l>-150</l><l>50</l></block><custom-block id="654185" s="Draw features %l with height %n"><l/><l>100</l>undefined</custom-block></script><comment x="20" y="437" w="641.7142857142857" collapsed="true">Task 2-2. Calculate the distance from &quot;dog&quot; to &quot;cat&quot;</comment><comment x="20" y="469.0000000000001" w="640.7428589548383" collapsed="false">The distance between two words can be calculated using word embedding. The block below returns the distance between “flower” and “honey”. Please calculate the distance between “dog” and “cat”. Show your program below and give your answer.</comment><script x="20" y="535.0000000000002"><custom-block id="11061" s="distance from features %l to %l"><custom-block id="16213" s="features of %txt in language %txt"><l>flower</l><l> </l>undefined</custom-block><custom-block id="16214" s="features of %txt in language %txt"><l>honey</l><l></l>undefined</custom-block>undefined</custom-block></script><comment x="20" y="590.0000000000002" w="641.1428571428571" collapsed="false">The distance between &quot;dog&quot; and &quot;cat&quot; is _____ (with two decimal places)</comment><comment x="20" y="644.0000000000002" w="642.7142857142858" collapsed="true">Task 2-3. Find the closest word to &quot;cat&quot;</comment><comment x="20" y="676.0000000000002" w="643.1428571428571" collapsed="false">Please combine the following blocks to find the closest word to “cat”.  Show your program below and give your answer.</comment><script x="20" y="730.0000000000002"><custom-block id="10763" s="features of %txt in language %txt"><l>dog</l><l> </l>undefined</custom-block></script><script x="20" y="763.0000000000002"><custom-block id="10762" s="closest word to %l %br in language %txt %br not includng %l"><l/><l></l><block id="10781" s="reportNewList"><list><l>dog</l><l>dogs</l></list></block>undefined</custom-block></script><comment x="20" y="827.0000000000002" w="641.1428571428571" collapsed="false">The closest word to &quot;cat&quot; is _____.</comment><comment x="20" y="881.0000000000002" w="642.2857142857141" collapsed="true">Task 2-4. Find the 5 closest words to &quot;cat&quot; </comment><comment x="20" y="913.0000000000002" w="643.1428571428571" collapsed="false">Please combine the following blocks to find the 5 closest words to “cat”. Show your program below and give your answer.</comment><script x="20" y="967.0000000000005"><custom-block id="11062" s="features of %txt in language %txt"><l>dog</l><l>English</l>undefined</custom-block></script><script x="20" y="1000.0000000000005"><custom-block id="11060" s="closest words to %l in language %txt %br and include distances %b"><l/><l>English</l><l><bool>true</bool></l>undefined</custom-block></script><comment x="20" y="1045.000000000001" w="642.1428571428571" collapsed="false">The 5 closest words to “cat” is (______,______,______,_______,_______)</comment><comment x="20" y="1099.000000000001" w="644.8571428571429" collapsed="true">Task 2-5. Use the word embedding method to answer which of the following words is closer to “mouse”.</comment><comment x="20" y="1131.000000000001" w="644.1428571428571" collapsed="false">Please review the blocks you’ve learned, try to answer which words  is closer to “mouse”. Show your program below and give your answer.&#xD;&#xD;A:“fox”&#xD;B:“cow”&#xD;C:“lion”</comment><comment x="20" y="1233.000000000001" w="650.1428571428571" collapsed="false">The closest word to “mouse” is ______ (A or B or C).</comment><comment x="20" y="1287.000000000001" w="654.1428571428571" collapsed="true">Task 2-6. Modify the program to calculate the distance between “man” and “king”</comment><comment x="20" y="1319.000000000001" w="659" collapsed="false">Vectors can be added and subtracted, please modify the program to calculate the distance between “man” and “king” and give your answer.</comment><script x="20" y="1373.000000000001"><custom-block id="626149" s="map %repRing on each element of %l and %l"><block id="626150" s="reifyReporter"><autolambda><block id="626151" s="reportDifference"><l></l><l></l></block></autolambda><list></list></block><custom-block id="626152" s="features of %txt in language %txt"><l>good</l><l>English</l>undefined</custom-block><custom-block id="626153" s="features of %txt in language %txt"><l>flower</l><l>English</l>undefined</custom-block>undefined</custom-block></script><comment x="20" y="1452.000000000001" w="659" collapsed="true">Task 2-7. Use the word embedding method to compare the relationships between word groups.</comment><comment x="20" y="1484.000000000001" w="660" collapsed="false">Please try to compare the relationship between word groups. Show your program below and give your answer to which two groups of words are closer. &#xD;&#xD;A:“king-queen” and “man-woman”&#xD;B:“king -woman” and “queen - man”&#xD;C:“man-king” and “wowan-queen”&#xD;&#xD;The followings are some blocks you might need.</comment><script x="20" y="1622.000000000001"><custom-block id="598427" s="map %repRing on each element of %l and %l"><block id="598428" s="reifyReporter"><autolambda><block id="626141" s="reportDifference"><l></l><l></l></block></autolambda><list></list></block><custom-block id="626143" s="features of %txt in language %txt"><l>king</l><l>English</l>undefined</custom-block><custom-block id="626142" s="features of %txt in language %txt"><l>man</l><l></l>undefined</custom-block>undefined</custom-block></script><script x="20" y="1701.000000000001"><block id="753422" s="clear"></block><block id="753423" s="gotoXY"><l>-150</l><l>50</l></block><custom-block id="753424" s="Draw features %l with height %n"><l/><l>100</l>undefined</custom-block></script><comment x="20" y="1779.000000000001" w="665.1428571428571" collapsed="false">The closer word groups  is ____ (A or B or C).</comment></scripts></sprite><watcher scope="Examples" s="xPosition" style="normal" x="0" y="33.8621855827399" color="74,108,212" hidden="true"/><watcher scope="Examples" s="yPosition" style="normal" x="-2.331972608280239" y="70.00776101108802" color="74,108,212" hidden="true"/><watcher scope="Stage" s="reportMouseX" style="normal" x="11.659863041403014" y="11.659863041402538" color="4,148,220" hidden="true"/><watcher scope="Stage" s="reportMouseY" style="normal" x="11.659863041403014" y="44.074284628474345" color="4,148,220" hidden="true"/><watcher var="average" style="normal" x="10" y="31.000001999999995" color="243,118,29" hidden="true"/></sprites></stage><hidden> reportCONS</hidden><headers></headers><code></code><blocks><block-definition s="distance from features %&apos;features 1&apos; to %&apos;features 2&apos;" type="reporter" category="variables" guid="77c33638-fd4c-4a80-8c5b-10dde4543e0e" isImported="false"><comment x="0" y="0" w="233.57142857142858" collapsed="false">Slow but elegant way of computing distance. &quot;square of distance from features ...&quot; is much faster.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block id="910" s="doDeclareVariables"><list><l>square of differences</l></list></block><block id="913" s="doSetVar"><l>square of differences</l><custom-block id="914" s="%upvar map %repRing over %mult%l"><l>#</l><block id="917" s="reifyReporter"><autolambda><block id="918" s="reportProduct"><block id="919" s="reportDifference"><block id="920" var="#1"/><block id="921" var="#2"/></block><block id="922" s="reportDifference"><block id="923" var="#1"/><block id="924" var="#2"/></block></block></autolambda><list><l>#1</l><l>#2</l></list></block><list><block id="927" var="features 1"/><block id="928" var="features 2"/></list>undefined</custom-block></block><block id="929" s="doReport"><block id="930" s="reportMonadic"><l><option>sqrt</option></l><custom-block id="931" s="combine with %repRing items of %l"><block id="933" s="reifyReporter"><autolambda><block id="934" s="reportSum"><l></l><l></l></block></autolambda><list></list></block><block id="935" var="square of differences"/>undefined</custom-block></block></block></script></block-definition><block-definition s="map %&apos;reporter&apos; on each element of %&apos;list 1&apos; and %&apos;list 2&apos;" type="reporter" category="variables" guid="f8a4a50a-4a5e-4ac8-97d6-6c4dc0f30ba3" isImported="false"><comment x="0" y="0" w="242.14285714285717" collapsed="false">Reports a list created by applying reporter to corresponding elements of the lists.</comment><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input><input type="%l"></input></inputs><script><block id="2957" s="doIf"><custom-block id="2958" s="empty? %l"><block id="2959" var="list 1"/>undefined</custom-block><script><block id="2960" s="doReport"><block id="2961" s="reportNewList"><list></list></block></block></script></block><block id="2962" s="doIf"><custom-block id="2963" s="empty? %l"><block id="2964" var="list 2"/>undefined</custom-block><script><block id="2965" s="doReport"><block id="2966" s="reportNewList"><list></list></block></block></script></block><block id="2967" s="doReport"><block id="2968" s="reportCONS"><block id="2969" s="evaluate"><block id="2971" var="reporter"/><list><block id="2972" s="reportListItem"><l>1</l><block id="2973" var="list 1"/></block><block id="2974" s="reportListItem"><l>1</l><block id="2975" var="list 2"/></block></list></block><custom-block id="2976" s="map %repRing on each element of %l and %l"><block id="2978" var="reporter"/><block id="2979" s="reportCDR"><block id="2980" var="list 1"/></block><block id="2981" s="reportCDR"><block id="2982" var="list 2"/></block>undefined</custom-block></block></block></script></block-definition><block-definition s="closest word to %&apos;features&apos; $nl in language %&apos;language&apos; $nl not includng %&apos;exceptions&apos;" type="reporter" category="variables" guid="0fea3b5e-d146-43f9-8a12-5129fb3b7550" isImported="false"><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
English
Finnish
French
German
Greek
Hindi
Indonesian
Italian
Japanese
Lithuanian
Portuguese
Sinhalese
Spanish
Swedish</options></input><input type="%l"></input></inputs><script><custom-block id="3112" s="Load eCraft2Learn library">undefined</custom-block><custom-block id="3113" s="wait for word embeddings in language %txt %br or use this word embeddings url %txt"><block id="3114" var="language"/><l></l>undefined</custom-block><block id="3115" s="doReport"><custom-block id="3116" s="call eCraft2Learn reporter %txt with %mult%s"><l>closest_word</l><list><block id="3117" var="features"/><block id="3118" var="exceptions"/><l></l><l>Cosine similarity</l><block id="3119" var="language"/></list>undefined</custom-block></block></script></block-definition><block-definition s="closest words to %&apos;features&apos; in language %&apos;language&apos; $nl and include distances %&apos;include distances&apos;" type="reporter" category="variables" guid="989faebf-b757-4be5-b605-6b7bea12120a" isImported="false"><comment x="0" y="0" w="218.57142857142858" collapsed="false">Reports all the words sorted by closeness to &apos;features&apos;. Optionally can report pairs of words and distances. Distances are measured using cosine similarity.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%txt"><options>Chinese
English
Finnish
French
German
Greek
Hindi
Indonesian
Italian
Japanese
Lithuanian
Portuguese
Sinhalese
Spanish
Swedish</options></input><input type="%b">false</input></inputs><script><block id="3168" s="doDeclareVariables"><list><l>result</l></list></block><block id="3171" s="doSetVar"><l>result</l><block id="3172" s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block id="3173" s="closest words to %l in language %txt %br and include distances %b %br do with result %cmdRing"><block id="3175" var="features"/><block id="3176" var="language"/><l><bool>false</bool></l><block id="3177" s="reifyScript"><script><block id="3178" s="doSetVar"><l>result</l><block id="3179" var="words"/></block></script><list><l>words</l></list></block>undefined</custom-block><block id="3181" s="doWaitUntil"><block id="3182" var="result"/></block><block id="3183" s="doReport"><block id="3184" var="result"/></block></script></block-definition><block-definition s="closest words to %&apos;features&apos; in language %&apos;language&apos; $nl and include distances %&apos;include distances&apos; $nl do with result %&apos;process result&apos;" type="command" category="lists" guid="af73b502-6458-4545-9881-677218da6741" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%txt"><options>record_callbacks(finished_callback);</options></input><input type="%b">false</input><input type="%cmdRing"></input></inputs><script><custom-block id="3185" s="Load eCraft2Learn library">undefined</custom-block><custom-block id="3186" s="wait for word embeddings in language %txt %br or use this word embeddings url %txt"><block id="3187" var="language"/><l></l>undefined</custom-block><custom-block id="3188" s="load tensorflow">undefined</custom-block><block id="3189" s="doReport"><custom-block id="3190" s="call eCraft2Learn reporter %txt with %mult%s"><l>closest_words</l><list><block id="3191" var="features"/><block id="3192" var="language"/><block id="3193" var="include distances"/><block id="3194" var="process result"/></list>undefined</custom-block></block></script></block-definition><block-definition s="load tensorflow" type="command" category="other" guid="ff4e41cd-c095-4e52-9379-5c158f6cf915" isImported="false"><header></header><code></code><translations></translations><inputs></inputs><script><block id="3195" s="doDeclareVariables"><list><l>loaded</l></list></block><block id="3198" s="doSetVar"><l>loaded</l><block id="3199" s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block id="3200" s="run eCraft2Learn command %txt with %mult%s"><l>load_tensorflow</l><list><block id="3201" s="reifyScript"><script><block id="3202" s="doSetVar"><l>loaded</l><block id="3203" s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></list>undefined</custom-block><block id="3204" s="doWaitUntil"><block id="3205" var="loaded"/></block></script></block-definition><block-definition s="set property %&apos;name&apos; to %&apos;value&apos;" type="command" category="lists" guid="50976885-39a1-4877-b294-224cf5040a64" isImported="false"><comment x="0" y="0" w="91.66666666666667" collapsed="false">sets the value of an existing property or inserts it anew</comment><header></header><code></code><translations></translations><inputs><input type="%s">width<options>type of data
width
height
backColorRed
backColorGreen
backColorBlue
leftOffset
upperOffset
lowerOffset
title
titleHeight
xLabel
xLabelHeight
yLabel
yLabelHeight
xLeft
xRight
yLower
yUpper
lineStyle
lineWidth
lineColorRed
lineColorGreen
lineColorBlue
datapointStyle
datapointWidth
datapointConnected
datapointColorRed
datapointColorGreen
datapointColorBlue
scalesPrecision
scalesTextheight
scalesNumberXintervals
minValue
maxValue
columns
rows</options></input><input type="%s"></input></inputs><script><block id="108" s="doDeclareVariables"><list><l>done</l><l>h</l></list></block><block id="112" s="doWarp"><script><block id="113" s="doSetVar"><l>name</l><block id="114" s="reportListItem"><l>1</l><block id="115" s="reportTextSplit"><block id="116" var="name"/><l> </l></block></block></block><block id="117" s="doSetVar"><l>done</l><block id="118" s="reportBoolean"><l><bool>false</bool></l></block></block><block id="119" s="doSetVar"><l>h</l><block id="120" s="errorObsolete"></block></block><block id="121" s="doIf"><block id="122" s="reportNot"><block id="123" var="done"/></block><script><block id="124" s="doAddToList"><block id="125" s="reportNewList"><list><block id="126" var="name"/><block id="127" var="value"/></list></block><block id="128" var="myProperties"/></block></script></block><block id="129" s="doIf"><block id="130" s="reportOr"><block id="131" s="reportOr"><block id="132" s="reportEquals"><l>name</l><l>titleHeight</l></block><block id="133" s="reportOr"><block id="134" s="reportEquals"><l>name</l><l>xLabelHeight</l></block><block id="135" s="reportEquals"><l>name</l><l>yLabelHeight</l></block></block></block><block id="136" s="reportEquals"><l>name</l><l>scalesTextheight</l></block></block><script><custom-block id="137" s="set offsets">undefined</custom-block></script></block></script></block></script></block-definition><block-definition s="property %&apos;name&apos;" type="reporter" category="lists" guid="6cfb9cf6-abf0-41d5-83ee-291d75069cc8" isImported="false"><comment x="0" y="0" w="95" collapsed="false">reads the value of an existing property</comment><header></header><code></code><translations></translations><inputs><input type="%s">width<options>type of data
width
height
backColorRed
backColorGreen
backColorBlue
leftOffset
upperOffset
lowerOffset
title
titleHeight
xLabel
xLabelHeight
yLabel
yLabelHeight
xLeft
xRight
yLower
yUpper
lineStyle
lineWidth
lineColorRed
lineColorGreen
lineColorBlue
datapointStyle
datapointWidth
datapointConnected
datapointColorRed
datapointColorGreen
datapointColorBlue
scalesPrecision
scalesTextheight
scalesNumberXintervals
minValue
maxValue
columns
rows</options></input></inputs><script><block id="138" s="doDeclareVariables"><list><l>result</l><l>h</l></list></block><block id="142" s="doWarp"><script><block id="143" s="doSetVar"><l>result</l><l>not found</l></block><block id="144" s="doSetVar"><l>name</l><block id="145" s="reportListItem"><l>1</l><block id="146" s="reportTextSplit"><block id="147" var="name"/><l> </l></block></block></block><block id="148" s="doSetVar"><l>h</l><block id="149" s="errorObsolete"></block></block><block id="150" s="doReport"><block id="151" var="result"/></block></script></block></script></block-definition><block-definition s="set offsets" type="command" category="looks" guid="8289ca77-9945-4f54-b53c-5fe056aa8257" isImported="false"><comment x="0" y="0" w="187.1666676666667" collapsed="false">sets the distances of the diagram axes from the edges of the DataSprite</comment><header></header><code></code><translations></translations><inputs></inputs><script><block id="152" s="doWarp"><script><block id="153" s="doIfElse"><block id="154" s="reportEquals"><block id="155" s="reportStringSize"><custom-block id="156" s="property %s"><l>title</l>undefined</custom-block></block><l>0</l></block><script><custom-block id="157" s="set property %s to %s"><l>upperOffset</l><l>0</l>undefined</custom-block></script><script><custom-block id="158" s="set property %s to %s"><l>upperOffset</l><block id="159" s="reportSum"><custom-block id="160" s="property %s"><l>titleHeight</l>undefined</custom-block><l>10</l></block>undefined</custom-block></script></block><block id="161" s="doIfElse"><block id="162" s="reportEquals"><block id="163" s="reportStringSize"><custom-block id="164" s="property %s"><l>xLabel</l>undefined</custom-block></block><l>0</l></block><script><custom-block id="165" s="set property %s to %s"><l>lowerOffset</l><l>20</l>undefined</custom-block></script><script><custom-block id="166" s="set property %s to %s"><l>lowerOffset</l><block id="167" s="reportSum"><custom-block id="168" s="property %s"><l>xLabelHeight</l>undefined</custom-block><block id="169" s="reportSum"><custom-block id="170" s="property %s"><l>scalesTextheight</l>undefined</custom-block><l>10</l></block></block>undefined</custom-block></script></block><block id="171" s="doIfElse"><block id="172" s="reportEquals"><block id="173" s="reportStringSize"><custom-block id="174" s="property %s"><l>yLabel</l>undefined</custom-block></block><l>0</l></block><script><custom-block id="175" s="set property %s to %s"><l>leftOffset</l><l>60</l>undefined</custom-block></script><script><custom-block id="176" s="set property %s to %s"><l>leftOffset</l><block id="177" s="reportSum"><custom-block id="178" s="property %s"><l>yLabelHeight</l>undefined</custom-block><block id="179" s="reportSum"><custom-block id="180" s="property %s"><l>scalesTextheight</l>undefined</custom-block><l>50</l></block></block>undefined</custom-block></script></block></script></block></script></block-definition><block-definition s="combine with %&apos;function&apos; items of %&apos;data&apos;" type="reporter" category="lists" guid="977469eb-02f3-4580-9d58-5f47b5c1d970" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%repRing"></input><input type="%l"></input></inputs><script><block id="1278" s="doWarp"><script><block id="1279" s="doIf"><custom-block id="1280" s="empty? %l"><block id="1281" s="reportCDR"><block id="1282" var="data"/></block>undefined</custom-block><script><block id="1283" s="doReport"><block id="1284" s="reportListItem"><l>1</l><block id="1285" var="data"/></block></block></script></block><block id="1286" s="doReport"><block id="1287" s="evaluate"><block id="1289" var="function"/><list><block id="1290" s="reportListItem"><l>1</l><block id="1291" var="data"/></block><custom-block id="1292" s="combine with %repRing items of %l"><block id="1294" var="function"/><block id="1295" s="reportCDR"><block id="1296" var="data"/></block>undefined</custom-block></list></block></block></script></block></script></block-definition><block-definition s="average %&apos;list&apos;" type="reporter" category="operators" guid="f7d7d123-b728-494d-a083-091cd331e8c4" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block id="1383" s="doReport"><block id="1384" s="reportQuotient"><custom-block id="1385" s="combine with %repRing items of %l"><block id="1387" s="reifyReporter"><autolambda><block id="1388" s="reportSum"><l></l><l></l></block></autolambda><list></list></block><block id="1389" var="list"/>undefined</custom-block><block id="1390" s="reportListLength"><block id="1391" var="list"/></block></block></block></script></block-definition><block-definition s="%&apos;#&apos; map %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists" guid="2ad014f3-11d1-43df-aecd-ed92ecb2603a" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block id="494" s="doWarp"><script><block id="495" s="doDeclareVariables"><list><l>mapone</l><l>mapmany</l></list></block><block id="499" s="doSetVar"><l>mapone</l><block id="500" s="reifyScript"><script><block id="501" s="doIf"><custom-block id="502" s="empty? %l"><block id="503" var="data"/>undefined</custom-block><script><block id="504" s="doReport"><block id="505" s="reportNewList"><list></list></block></block></script></block><block id="506" s="doSetVar"><l>#</l><block id="507" var="count"/></block><block id="508" s="doReport"><block id="509" s="reportCONS"><block id="510" s="evaluate"><block id="512" var="function"/><list><block id="513" s="reportListItem"><l>1</l><block id="514" var="data"/></block></list></block><block id="515" s="evaluate"><block id="517" var="mapone"/><list><block id="518" s="reportCDR"><block id="519" var="data"/></block><block id="520" s="reportSum"><block id="521" var="count"/><l>1</l></block></list></block></block></block></script><list><l>data</l><l>count</l></list></block></block><block id="524" s="doSetVar"><l>mapmany</l><block id="525" s="reifyScript"><script><block id="526" s="doIf"><custom-block id="527" s="empty? %l"><block id="528" s="reportListItem"><l>1</l><block id="529" var="data lists"/></block>undefined</custom-block><script><block id="530" s="doReport"><block id="531" s="reportNewList"><list></list></block></block></script></block><block id="532" s="doSetVar"><l>#</l><block id="533" var="count"/></block><block id="534" s="doReport"><block id="535" s="reportCONS"><block id="536" s="evaluate"><block id="538" var="function"/><custom-block id="539" s="%upvar map %repRing over %mult%l"><l>#</l><block id="542" s="reifyReporter"><autolambda><block id="543" s="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><list><block id="544" var="data lists"/></list>undefined</custom-block></block><block id="545" s="evaluate"><block id="547" var="mapmany"/><list><custom-block id="548" s="%upvar map %repRing over %mult%l"><l>#</l><block id="551" s="reifyReporter"><autolambda><block id="552" s="reportCDR"><l/></block></autolambda><list></list></block><list><block id="553" var="data lists"/></list>undefined</custom-block><block id="554" s="reportSum"><block id="555" var="count"/><l>1</l></block></list></block></block></block></script><list><l>data lists</l><l>count</l></list></block></block><block id="558" s="doIfElse"><custom-block id="559" s="empty? %l"><block id="560" s="reportCDR"><block id="561" var="lists"/></block>undefined</custom-block><script><block id="562" s="doReport"><block id="563" s="evaluate"><block id="565" var="mapone"/><list><block id="566" s="reportListItem"><l>1</l><block id="567" var="lists"/></block><l>1</l></list></block></block></script><script><block id="568" s="doReport"><block id="569" s="evaluate"><block id="571" var="mapmany"/><list><block id="572" var="lists"/><l>1</l></list></block></block></script></block></script></block></script></block-definition><block-definition s="Draw features %&apos;features&apos; with height %&apos;height&apos;" type="command" category="pen" guid="2df47e01-0f76-4eaa-9e9e-72b45ea2b628" isImported="false"><comment x="0" y="0" w="274.2857142857143" collapsed="false">Draws the vector as a vertical line for each number.</comment><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><custom-block id="518633" s="let %upvar be %s"><l>y</l><block id="518635" s="yPosition"></block>undefined</custom-block><custom-block id="518636" s="for each %upvar of %l %cs"><l>feature</l><block id="518638" var="features"/><script><block id="518639" s="down"></block><block id="518640" s="changeYPosition"><block id="518641" s="reportProduct"><block id="518642" var="height"/><block id="518643" var="feature"/></block></block><block id="518644" s="up"></block><block id="518645" s="changeXPosition"><l>1</l></block><block id="518646" s="setYPosition"><block id="518647" var="y"/></block></script>undefined</custom-block></script></block-definition><block-definition s="Load eCraft2Learn library" type="command" category="other" guid="7144cf21-fd89-4342-b0d4-95faa3033730" isImported="false"><comment x="0" y="0" w="248.57142857142858" collapsed="true">Returns only after eCraft2Learn library is loaded</comment><header></header><code></code><translations></translations><inputs></inputs><script><block id="518648" s="doWaitUntil"><custom-block id="518649" s="Try to load ecraft2learn library">undefined</custom-block></block></script></block-definition><block-definition s="Try to load ecraft2learn library" type="reporter" category="other" guid="f25ef7bf-dfe8-42b8-95d2-58074110cb25" isImported="false"><comment x="0" y="0" w="323.5714285714286" collapsed="true">Should only be called by Load eCraft2Learn library</comment><header></header><code></code><translations></translations><inputs></inputs><script><block id="518650" s="doReport"><block id="518651" s="evaluate"><block id="518653" s="reportJSFunction"><list></list><l>if (typeof ecraft2learn === &apos;object&apos;) {&#xD;   return true;&#xD;}&#xD;if (window.waiting_for_ecraft2learn_library) {&#xD;   return false;&#xD;}&#xD;window.waiting_for_ecraft2learn_library = true;&#xD;let script = document.createElement("script");&#xD;script.type = "text/javascript";&#xD;if (window.location.hostname === &apos;localhost&apos;) {&#xD;    script.src = window.location.protocol + "//" + window.location.host + "/ai/ecraft2learn-beta.js"; // notice this the beta version&#xD;} else {&#xD;    script.src = "https://ecraft2learn.github.io/ai/ecraft2learn.js";&#xD;}&#xD;document.head.appendChild(script);&#xD;return false;</l></block><list></list></block></block></script></block-definition><block-definition s="call eCraft2Learn reporter %&apos;reporter name&apos; with %&apos;inputs&apos;" type="reporter" category="other" guid="b292af38-c33b-4d49-957f-6f4be695f889" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><block id="518654" s="doReport"><block id="518655" s="evaluate"><block id="518657" s="reportJSFunction"><list><l>function_name</l><l>parameters</l><l>no_warning</l></list><l>if (typeof ecraft2learn === &apos;object&apos;) {&#xD;    return ecraft2learn.run(function_name, parameters);&#xD;}&#xD;if (!no_warning) {&#xD;    alert("Any eCraft2Learn command must be run before the " + function_name + " reporter.");&#xD;}&#xD;return 0;</l></block><list><block id="518658" var="reporter name"/><block id="518659" var="inputs"/></list></block></block></script></block-definition><block-definition s="features of %&apos;word&apos; in language %&apos;language&apos;" type="reporter" category="variables" guid="90b0bce0-99c4-4284-b0db-83ee9d6e074c" isImported="false"><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 13 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
English
Finnish
French
German
Greek
Hindi
Indonesian
Italian
Japanese
Lithuanian
Portuguese
Sinhalese
Spanish
Swedish</options></input></inputs><script><custom-block id="518660" s="Load eCraft2Learn library">undefined</custom-block><custom-block id="518661" s="wait for word embeddings in language %txt %br or use this word embeddings url %txt"><block id="518662" var="language"/><l></l>undefined</custom-block><block id="518663" s="doReport"><custom-block id="518664" s="call eCraft2Learn reporter %txt with %mult%s"><l>word_to_features</l><list><block id="518665" var="word"/><block id="518666" var="language"/></list>undefined</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" guid="a78b569c-1c8d-4463-9e36-0da66bc9a171" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%txt"><options>Chinese
English
Finnish
French
German
Greek
Hindi
Indonesian
Italian
Japanese
Portuguese
Sinhalese
Swedish</options></input><input type="%txt"></input></inputs><script><block id="518667" s="doDeclareVariables"><list><l>loaded</l></list></block><block id="518670" s="doSetVar"><l>loaded</l><block id="518671" s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block id="518672" s="Load words to features in language %txt then %cmdRing %br use this URL instead of default %txt"><block id="518674" var="language"/><block id="518675" s="reifyScript"><script><block id="518676" s="doSetVar"><l>loaded</l><block id="518677" s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block id="518678" var="url"/>undefined</custom-block><block id="518679" s="doWaitUntil"><block id="518680" 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" guid="27543b28-d1e0-4b8b-81a8-67d7c3285299" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%txt"><options>Chinese
English
Finnish
French
German
Greek
Hindi
Indonesian
Italian
Japanese
Portuguese
Sinhalese
Swedish</options></input><input type="%cmdRing"></input><input type="%txt"></input></inputs><script><custom-block id="518681" s="run eCraft2Learn command %txt with %mult%s"><l>word_embeddings_ready</l><list><block id="518682" var="language"/><block id="518683" var="do when loaded"/><block id="518684" var="url"/></list>undefined</custom-block></script></block-definition><block-definition s="for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists" guid="1fa28862-9360-4291-a94d-88e732f8e2d7" isImported="false"><header></header><code></code><translations>de:für jedes _ von _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block id="518690" s="doUntil"><custom-block id="518691" s="empty? %l"><block id="518692" var="data"/>undefined</custom-block><script><block id="518693" s="doSetVar"><l>item</l><block id="518694" s="reportListItem"><l>1</l><block id="518695" var="data"/></block></block><block id="518696" s="doRun"><block id="518698" var="action"/><list><block id="518699" s="reportListItem"><l>1</l><block id="518700" var="data"/></block></list></block><block id="518701" s="doSetVar"><l>data</l><block id="518702" s="reportCDR"><block id="518703" var="data"/></block></block></script></block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;value&apos;" type="command" category="other" guid="3235e5a9-8fa4-4faf-a1fe-d80ab927591d" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block id="518704" s="doSetVar"><l>var</l><block id="518705" var="value"/></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists" guid="e837d2b7-7b6b-4ad1-a01a-5bb64283fc57" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block id="518706" s="doReport"><block id="518707" s="reportEquals"><block id="518708" var="data"/><block id="518709" s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="run eCraft2Learn command %&apos;command name&apos; with %&apos;inputs&apos;" type="command" category="other" guid="d8b334f5-a1f7-4b80-82f0-347895eb2843" isImported="false"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><block id="518711" s="doRun"><block id="518713" s="reportJSFunction"><list><l>function_name</l><l>parameters</l></list><l>if (typeof ecraft2learn === &apos;object&apos;) {&#xD;    ecraft2learn.run(function_name, parameters);&#xD;} else {&#xD;   var script = document.createElement("script");&#xD;   script.type = "text/javascript";&#xD;   script.addEventListener(&apos;error&apos;, function () {&#xD;          alert("Unable to load https://ecraft2learn.github.io/ai/ecraft2learn.js. Check your network connection.");&#xD;   });&#xD;   script.src = "https://ecraft2learn.github.io/ai/ecraft2learn.js";&#xD;   script.addEventListener(&apos;load&apos;, function () {&#xD;          ecraft2learn.run(function_name, parameters);&#xD;   });&#xD;   document.head.appendChild(script);&#xD;}&#xD;</l></block><list><block id="518714" var="command name"/><block id="518715" var="inputs"/></list></block></script></block-definition></blocks><variables><variable name="average"><l>0</l></variable></variables><editing></editing></project>