CINXE.COM
Wolfram JavaScript Character-Level Language Model V1 - Wolfram Neural Net Repository
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="ssi-loaded" content="true" /> <link rel="stylesheet" href="https://www.wolframcdn.com/fonts/source-sans-pro/1.0/global.css"> <link rel="stylesheet" href="https://www.wolframcloud.com//obj/resourcesystem/webresources/global-wolfram-skinny-2/1.2.0/main.css"> <script src="https://www.wolframcdn.com/consent/cookie-consent.js"></script> <script> !function(){if(/.*(__cookie_consent=(1|2)).*/i.test(document.cookie)){var e=function(){switch(!1){case-1===location.hostname.indexOf("devel"):return"//wal.devel.wolfram.com";case-1===location.hostname.indexOf("test"):return"//wal.test.wolfram.com";default:return"//wal.wolfram.com"}}();a=window,t=document,l="script",o=e,n="3.0.0",c="wal",a.WolframAnalyticsObject=c,a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)},a[c].q=a[c].q||[],a[c].t=1*new Date,a[c].d=o,a[c].v=n,r=t.createElement(l),w=t.getElementsByTagName(l)[0],r.async=1,r.src=o+"/js/"+n+"/wal.js",w.parentNode.insertBefore(r,w),wal("queue",!0),wal("batch",!0),wal("log","pageload"),wal("log","usermeta"),wal("batch",!1),wal("queue",!1);wal("addListener","click",{key:"walgc",levels:5,is:{el:["a","area","button"],attr:["data-walid"]},not:{attr:["data-walgcexclude"]},prop:["href"],attr:["data-walid"]})}var a,t,l,o,n,c,r,w}(); </script> <link rel="apple-touch-icon" sizes="180x180" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon-16x16.png"> <link rel="manifest" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/site.webmanifest"> <link rel="mask-icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/safari-pinned-tab.svg" color="#609125"> <link rel="shortcut icon" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/favicon.ico"> <meta name="msapplication-TileColor" content="#609125"> <meta name="msapplication-config" content="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/favicon/browserconfig.xml"> <meta name="theme-color" content="#609125"> <title>Wolfram JavaScript Character-Level Language Model V1 - Wolfram Neural Net Repository</title> <meta name="description" content="Generate JavaScript code" /> <link rel="stylesheet" href="https://www.wolframcdn.com/css/normalize.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.css" /> <link rel="stylesheet" href="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/main.css" /> </head> <body id="shingle"> <header id="gws-header"> <nav class="wrap"> <ul> <li><a href="https://www.wolfram.com/" target="gws-header">Wolfram.com</a></li> <li><a href="https://www.wolframalpha.com/" target="gws-header">WolframAlpha.com</a></li> <li><a href="https://www.wolframcloud.com/" target="gws-header">WolframCloud.com</a></li> </ul> </nav> </header> <header id="pac-common-header" class="container" data-disable-auth="true" data-publisher-ids-url="https://resources.wolframcloud.com/user/publishers" > <div class="wrap"> <div class="header-top"> <a href="https://resources.wolframcloud.com/NeuralNetRepository/" ><div class="logo-frame"><svg class="logo" id="iconGroup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 36" width="70" height="70" > <defs> <style> .iconAdditional2 { fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 0.25px; } .iconMain2 { fill: #ffffff; } .iconAdditional2, .iconAlternate2 { fill: #bebebe; } </style> </defs> <path id="white2" class="iconAdditional2" d="M19.58253,32.2817l13.25-9.4918m0-9.4918-13.25-9.4918m0,18.9836,13.25-9.4918m-13.25,0h13.25m-13.25,9.4918h13.25m-13.25,9.4918,13.25-18.9836m-13.25-9.4918,13.25,18.9836m-13.25-9.4918,13.25,9.4918m-29-14.2377,15.75-4.7459M3.83253,18.044l15.75-4.7459m-15.75,14.2377,15.75-4.7459m0-9.4918-15.75-4.7459m15.75,14.2377L3.83253,8.5522m15.75,23.7295L3.83253,8.5522m0,9.4918,15.75-14.2377m-15.75,23.7295,15.75-23.7295M3.83253,18.044l15.75,4.7459m0-9.4918-15.75,14.2377m0-9.4918,15.75,14.2377m-15.75-4.7459,15.75,4.7459" /> <path id="white1" class="iconMain2" d="M21.96587,3.38333A2.38333,2.38333,0,1,1,19.58253,1,2.38333,2.38333,0,0,1,21.96587,3.38333Zm-2.38333,7.55724a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,10.94058Zm0,9.44018a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,20.38076Zm0,9.44018a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,19.58253,29.82093Z" /> <path id="gray2" class="iconAlternate2" d="M35.66507,12.82351a2.38333,2.38333,0,1,1-2.38333-2.38333A2.38333,2.38333,0,0,1,35.66507,12.82351Zm-2.38333,8.05764a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,33.28173,20.88116Z" /> <path id="gray1" class="iconAlternate2" d="M5.76667,8.10342A2.38333,2.38333,0,1,1,3.38333,5.72009,2.38333,2.38333,0,0,1,5.76667,8.10342ZM3.38333,15.66067A2.38333,2.38333,0,1,0,5.76667,18.044,2.38333,2.38333,0,0,0,3.38333,15.66067Zm0,9.94058a2.38333,2.38333,0,1,0,2.38333,2.38333A2.38333,2.38333,0,0,0,3.38333,25.60125Z" /> </svg> </div > <div class="text"> <h1 class="site-title"> <span class="wordmark">Wolfram Neural Net Repository</span > </h1> <p class="tagline">Immediate Computable Access to <span class="nobr">Neural Net Models</span></p ></div ></a> </div> </div> <nav id="pac-common-navigation"> <h2 class="visuallyhidden">Primary Navigation</h2> <div class="wrap"> <div class="section search-wrapper"> <div id="react-autocomplete" data-action="https://resources.wolframcloud.com/NeuralNetRepository/search/" data-resources-base-url="https://resources.wolframcloud.com/NeuralNetRepository/resources/" data-autocomplete-json="https://resources.wolframcloud.com/NeuralNetRepository/autocomplete/allnames.json" > <form id="repo-header-search-form" role="search" action="https://resources.wolframcloud.com/NeuralNetRepository/search/" method="get" > <input type="search" name="i" required="required" placeholder="Search" /> </form> </div> </div ><div class="section sorting-properties"> <ul> <li> <button class="nav-button"> <span class="label">Input Domains</span ><svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path class="arrow-down" d="M4,4l4,4l4-4" /> <path class="arrow-right" d="M6,2l4,4l-4,4" /> </svg> </button> <div class="dropdown closed"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Audio/">Audio</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Image/">Image</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Numeric/">Numeric</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Text/">Text</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/inputdomain/Video/">Video</a></li > </ul> <div class="other-nav-pages"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/random"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><g><path d="M54 14v6H44c-3.08 0-5.41 2.19-7.55 4.8-1.54 1.86-3.01 4.1-4.46 6.4a63.36 63.36 0 0 0-4.45-6.4C25.4 22.18 23.08 20 20 20H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c.91 0 2.58 1.06 4.45 3.33A74.99 74.99 0 0 1 29.64 35a74.99 74.99 0 0 1-5.2 7.67C22.59 44.94 20.92 46 20 46H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c3.08 0 5.4-2.19 7.54-4.8 1.53-1.86 3-4.1 4.45-6.4a63.04 63.04 0 0 0 4.46 6.4C38.59 47.82 40.92 50 44 50h10v6l10-8-10-8v6H44c-.92 0-2.6-1.06-4.46-3.33a74.49 74.49 0 0 1-5.2-7.67 74.49 74.49 0 0 1 5.2-7.67C41.4 25.06 43.08 24 44 24h10v6l10-8-10-8z"></path></g></svg></span> Random Resource</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/all"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g><path d="M5 9h3V6H5zm6 0h12V6H11zm-6 6h3v-3H5zm6 0h12v-3H11zm-6 6h3v-3H5zm6 0h12v-3H11z"></path></g></svg></span> Alphabetical List</a></li > </ul></div > </div></li ><li> <button class="nav-button"> <span class="label">Task Types</span ><svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path class="arrow-down" d="M4,4l4,4l4-4" /> <path class="arrow-right" d="M6,2l4,4l-4,4" /> </svg> </button> <div class="dropdown closed"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Audio-Analysis/">Audio Analysis</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Classification/">Classification</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Data-Generation/">Data Generation</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Denoising/">Denoising</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Feature-Extraction/">Feature Extraction</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Image-Captioning/">Image Captioning</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Image-Processing/">Image Processing</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Language-Modeling/">Language Modeling</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Object-Detection/">Object Detection</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Question-Answering/">Question Answering</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Regression/">Regression</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Semantic-Segmentation/">Semantic Segmentation</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Speech-Recognition/">Speech Recognition</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Translation/">Translation</a></li > </ul> <div class="other-nav-pages"> <ul class="grid"> <li><a href="https://resources.wolframcloud.com/NeuralNetRepository/random"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70"><g><path d="M54 14v6H44c-3.08 0-5.41 2.19-7.55 4.8-1.54 1.86-3.01 4.1-4.46 6.4a63.36 63.36 0 0 0-4.45-6.4C25.4 22.18 23.08 20 20 20H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c.91 0 2.58 1.06 4.45 3.33A74.99 74.99 0 0 1 29.64 35a74.99 74.99 0 0 1-5.2 7.67C22.59 44.94 20.92 46 20 46H7a1 2 0 0 0-1 2 1 2 0 0 0 1 2h13c3.08 0 5.4-2.19 7.54-4.8 1.53-1.86 3-4.1 4.45-6.4a63.04 63.04 0 0 0 4.46 6.4C38.59 47.82 40.92 50 44 50h10v6l10-8-10-8v6H44c-.92 0-2.6-1.06-4.46-3.33a74.49 74.49 0 0 1-5.2-7.67 74.49 74.49 0 0 1 5.2-7.67C41.4 25.06 43.08 24 44 24h10v6l10-8-10-8z"></path></g></svg></span> Random Resource</a></li ><li><a href="https://resources.wolframcloud.com/NeuralNetRepository/all"><span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g><path d="M5 9h3V6H5zm6 0h12V6H11zm-6 6h3v-3H5zm6 0h12v-3H11zm-6 6h3v-3H5zm6 0h12v-3H11z"></path></g></svg></span> Alphabetical List</a></li > </ul></div > </div></li > </ul></div><div class="section learn-more-about-wl"> <ul> <li class="learn-more-about-wl-frame"> <a class="learn-more-about-wl-button" href="https://www.wolfram.com/language/" ><svg viewBox="0 0 124 31"> <path d="M15.5 1a14.5 14.5 0 1 1 0 29 14.5 14.5 0 0 1 0-29Zm0 2a12.5 12.5 0 1 0 0 25 12.5 12.5 0 0 0 0-25Zm1.8 5.4v4.3l-1.5-1.1-.3-1.5 1.8-1.7ZM5.6 20.3a11 11 0 1 1 15.7 4.5l-3.7-4.7 3 .4h2l2-2.5s-5-3-6.6-4.8a46 46 0 0 0-.2-6.6l-2.6 2.6-1.3-4a13.5 13.5 0 0 0-3.7 6c-2 2.3-3.4 6-4.6 9.1Zm13.8 5.5a11 11 0 0 1-12.6-3.6c.9-4 2-8.7 4-10.1.9-1.7 1.2-4.2 3-5.5.4 1.3 1 4 1.5 5.3 2 2.1 5.2 4.7 7.3 5.7.2.1.5 1 .5 1l-.9 1-9-.8-2.4.1c.4-1 1.4-2 1.4-2s-1-.5-1.6-.6l.8-1.1c-.2 0-2 .9-2.2 1.6l1.5.5s-1 1-1.2 2.6c0 0 3-.4 5-.1h1.3l3.6 6Zm-4-10.8c-.2.3-.3.5-.3.8.5 0 1 .1 1.6.5l1.2-.4c-.7-.5-1.5-1-2.6-.9Z" ></path> <text font-family="Source Sans Pro, system-ui, sans-serif" font-size="11" > <tspan x="36" y="11">Learn More about</tspan> <tspan x="36" y="26">Wolfram Language</tspan> </text> </svg></a > </li> </ul> </div> </div> </nav> </header> <main class="shingle-content"> <div class="wrap"> <div class="page-title"> <div class="zc_c2c" data-clipboard-text='NetModel["Wolfram JavaScript Character-Level Language Model V1"]' > <h1> Wolfram JavaScript Character-Level Language Model V1 <span class="action"></span> <span class="data"></span> </h1> </div> </div> <p class="lead">Generate JavaScript code</p> <div class="details"> <p>This language model is based on a simple stack of gated recurrent layers. It was trained by Wolfram Research in 2018 using teacher forcing on sequences of length 100.</p> </div> <p class="netsize"> Number of layers: 7 | Parameter count: 2,570,530 | Trained size: 10 MB | </p> <h2 id="training-set-info">Training Set Information</h2> <ul> <li> Internal Wolfram training set, consisting of over 40 MB of JavaScript code scraped from GitHub. </li> </ul> <div class="col main"> <h2 id="Examples">Examples</h2> <div id="notebookButtons" class="example"> <p> <a href="https://www.wolframcloud.com/download/42c79d20-660e-461e-ba88-2f1dbfb9f0ac?extension=always&filename=Wolfram-JavaScript-Character-Level-Language-Model-V1-1-7-0-examples" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Download Example Notebook" > <svg xmlns="http://www.w3.org/2000/svg" class="notebook-download" width="26" height="32" viewBox="0 0 26 32" role="presentation" > <path class="fill" fill="#598527" d="M3.5 0C2.3 0 1.27.86 1.04 2H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v1H0v3h1v.5C1 30.9 2.12 32 3.5 32h20c1.4 0 2.5-1.1 2.5-2.5v-27C26 1.1 24.88 0 23.5 0h-20zm0 .98h20c.85 0 1.52.67 1.52 1.5v26.03c0 .85-.67 1.52-1.5 1.52H3.48c-.85 0-1.52-.67-1.52-1.5V2.48c0-.85.67-1.52 1.5-1.52zM19.54 15.15L22 12.4l-3.6-.77.36-3.64-3.4 1.46L13.5 6.3l-1.87 3.16L8.25 8l.37 3.63L5 12.4l2.46 2.75L5 17.88l3.6.78-.36 3.65 3.4-1.47L13.5 24l1.87-3.16 3.38 1.47-.37-3.64L22 17.9zm.65 1.77l-1.66-.56-1.12-1.45 1.44.55zm-5.3 3.38l-1.02 1.73v-1.8l1.06-1.53zm-2.42-8.95l-1.75-.6-1-1.36 1.83.8zm2.96-1.16l1.84-.8-1 1.34-1.76.6zm2.23 1.58l-.9 1.25.06-1.88 1.04-1.4zM13.5 19.5l-1.36-1.95 1.36-1.83 1.36 1.83zm-2.56-5.6l-.07-2.37 2.27.8v2.32zm2.94-1.57l2.26-.8-.06 2.38-2.2.75v-2.32zm-4.55-.55l-.2-2.02 1.04 1.4.05 1.87zm3.6 3.53l-1.36 1.84-2.3-.68 1.46-1.9zm-.85 3.4l1.06 1.53v1.8l-1.02-1.73zm2-3.4l2.2-.73 1.46 1.9-2.3.67zm6.6-2.46l-1.7 1.9-2.03-.74 1.2-1.7zM13.5 7.67l1.3 2.2-1.3 1.65-1.3-1.65zm-7.18 5.17l2.52-.55 1.2 1.7-2 .74zm1.82 2.6l1.44-.53-1.12 1.46-1.65.56zM6.96 17.6l1.7-.58 1.85.53-1.53.48zm2.36 1.05l2.05-.64.05 2.17-2.36 1.02zm6.26 1.52l.05-2.16 2.05.65.26 2.54zm2.44-2.14l-1.53-.48 1.82-.53 1.72.58z" /> </svg> <span class="text" ><span class="line">Download Example </span ><span class="line">Notebook</span></span > </a> </p> <p> <a href="https://www.wolframcloud.com/env/42c79d20-660e-461e-ba88-2f1dbfb9f0ac?src=CloudBasicCopiedContent#sidebar=basic-notebook-links" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Open in Wolfram Cloud" > <svg xmlns="http://www.w3.org/2000/svg" class="cloud-open example" width="41" height="32" viewBox="0 0 64 50" role="presentation" > <path class="stroke" fill="none" stroke="#598527" stroke-width="2" stroke-linecap="round" d="M22 42h30c6.08 0 11-4.92 11-11 0-3.85-2.03-7.42-5.33-9.4.22-.7.33-1.4.33-2.1 0-3.87-3.13-7-7-7-.43 0-.86.04-1.3.12C48.35 5.86 42.4 1 35.5 1c-4.74 0-9.18 2.32-11.9 6.2-1.3-.45-2.7-.7-4.1-.7C12.6 6.5 7 12.1 7 19c0 .87.1 1.73.28 2.57C3.45 23.4 1 27.27 1 31.5c0 3.92 2.1 7.54 5.5 9.5" /> <path class="fill" fill="#598527" d="M22.5 19.1L45 20 28.3 35l1-5.5c-5.24 2.27-13.42 9.74-16.1 19.8l-.6-.1c0-12.6 7.6-20.76 14.5-26.3z" /> </svg> <span class="text" ><span class="line">Open in </span ><span class="line">Wolfram Cloud</span></span > </a> </p> </div> <!-- RS_SHINGLE_EXAMPLE_SECTION_START --><div class="example-notebook"><div class="subsection cell-group"><h3>Resource retrieval</h3><p class="example-text">Get the pre-trained network:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[1]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/672f284ce8931c9c.png" alt="NetModel["Wolfram JavaScript Character-Level Language Model V1"]" width="435" height="19" style="width: 27.1875em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[1]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/1a7fc3408bd99516.png" width="385" height="156" style="width: 24.0625em; height: 9.7500em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Basic usage</h3><p class="example-text">Predict the next character of a given sequence:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[2]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/15cdf1f6d0115439.png" alt="NetModel["Wolfram JavaScript Character-Level Language Model \ V1"]["alert"]" width="488" height="19" style="width: 30.5000em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[2]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4f6586d85525f5c6.png" width="4" height="17" style="width: 0.2500em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Get the top 15 probabilities:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[3]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/5523d5a0734b9590.png" alt="topProbs = NetModel["Wolfram JavaScript Character-Level Language Model V1"][ "alert", {"TopProbabilities", 15}]" width="511" height="43" style="width: 31.9375em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[3]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4119e5408dff87a2.png" width="538" height="61" style="width: 33.6250em; height: 3.8125em;"/></div></td></tr></table></div><p class="example-text">Plot the top 15 probabilities:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[4]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/0cc79233967d618d.png" alt="BarChart[Thread@ Labeled[Values@topProbs, Keys[topProbs] /. {"\n" -> "\\n", "\t" -> "\\t"}], ScalingFunctions -> "Log"]" width="579" height="43" style="width: 36.1875em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[4]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/150fa3b9cd31ac64.png" width="360" height="218" style="width: 22.5000em; height: 13.6250em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Generation</h3><p class="example-text">Generate text efficiently with <span class="inline-formula"><a class="reflink" href="https://reference.wolfram.com/language/ref/NetStateObject">NetStateObject</a></span>. A built-in option for temperature sampling is available in Wolfram Language 12.0, while it has to be implemented explicitly in earlier versions.</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[5]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/1fc3411c083f6b17.png" alt="generateSample[start_, len_, temp_ : 1] := Block[{net, score, sampler, obj}, net = NetModel[ "Wolfram JavaScript Character-Level Language Model V1"]; If[$VersionNumber < 12.0, score = NetTake[net, 6]; sampler = NetTake[net, -1]; obj = NetStateObject[score]; StringJoin@ NestList[sampler[obj[#]/temp, "RandomSample"] &, start, len], obj = NetStateObject[net]; StringJoin@ NestList[obj[#, {"RandomSample", "Temperature" -> temp}] &, start, len] ] ]" width="580" height="254" style="width: 36.2500em; height: 15.8750em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><p class="example-text">Generate for 100 steps using “alert” as an initial string:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[6]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4d95c1df87cf1007.png" alt="generateSample["alert", 100]" width="186" height="19" style="width: 11.6250em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[6]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/29f8d329aed81212.png" width="272" height="104" style="width: 17.0000em; height: 6.5000em;"/></div></td></tr></table></div><p class="example-text">The third optional argument is a “temperature” parameter that scales the input to the final softmax. A high temperature flattens the distribution from which characters are sampled, increasing the probability of extracting less likely characters:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[7]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4d1855f5d8aee082.png" alt="generateSample["alert", 100, 1.1]" width="212" height="19" style="width: 13.2500em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[7]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/00ab1759a7f4ec24.png" width="205" height="168" style="width: 12.8125em; height: 10.5000em;"/></div></td></tr></table></div><p class="example-text">Decreasing the temperature sharpens the peaks of the sampling distribution, further decreasing the probability of extracting less likely characters:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[8]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4681cb779d207c8c.png" alt="generateSample["alert", 100, 0.4]" width="212" height="19" style="width: 13.2500em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[8]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/4f0366818115cdee.png" width="252" height="61" style="width: 15.7500em; height: 3.8125em;"/></div></td></tr></table></div><p class="example-text">Very high temperature settings are equivalent to random sampling:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[9]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/5cf7595e30475ed3.png" alt="generateSample["alert", 100, 10]" width="208" height="19" style="width: 13.0000em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[9]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/2668c83d28dc742f.png" width="423" height="39" style="width: 26.4375em; height: 2.4375em;"/></div></td></tr></table></div><p class="example-text">Very low temperature settings are equivalent to always picking the character with maximum probability. It is typical for sampling to “get stuck in a loop”:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[10]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/0cf8d22a06779ff4.png" alt="generateSample["alert", 200, 0.01]" width="220" height="19" style="width: 13.7500em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[10]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/231387b590eaac1f.png" width="245" height="125" style="width: 15.3125em; height: 7.8125em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Inspection of predictions</h3><p class="example-text">Define a function that takes a string and guesses the next character as it reads, showing the predictions in a grid. The input string is shown on top, while the top 5 predictions are aligned below each character, starting from more likely guesses. For each prediction, the intensity of the color is proportional to the probability:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[11]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/69c4c3f779d84ca8.png" alt="inspectPredictions[string_] := Block[ {obj, chars, pred, predItems, charItems}, obj = NetStateObject[ NetModel[ "Wolfram JavaScript Character-Level Language Model V1"]]; chars = Characters[string]; pred = Map[obj[#, {"TopProbabilities", 5}] &, chars] /. {"\n" -> "\\n", "\t" -> "\\t"}; predItems = Map[Item[First[#], Background -> Opacity[Last[#], Darker[Green]]] &, pred, {2}]; predItems = Prepend[Most[predItems], Table[Item["", Background -> Gray], 5]]; charItems = Item[#, Background -> LightBlue] & /@ (chars /. {"\n" -> "\\n", "\t" -> "\\t"}); Grid[ Prepend[Transpose[predItems], charItems], Spacings -> {0.6, 0.2}, Dividers -> All, FrameStyle -> Gray ] ]" width="611" height="301" style="width: 38.1875em; height: 18.8125em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out"></td></tr></table></div><div class="example-frame"><table class="example input"><tr><td class="in-out">In[12]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/77ee64d479968b45.png" alt="inspectPredictions["var list = new Array('foo', 'bar')"]" width="333" height="19" style="width: 20.8125em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[12]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/42c2279e74639d0f.png" width="537" height="93" style="width: 33.5625em; height: 5.8125em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Net information</h3><p class="example-text">Inspect the sizes of all arrays in the net:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[13]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/0c3ea1ad7e0a254d.png" alt="NetInformation[ NetModel["Wolfram JavaScript Character-Level Language Model V1"], \ "ArraysElementCounts"]" width="541" height="43" style="width: 33.8125em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[13]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/0d0f6aef11e0af82.png" width="607" height="147" style="width: 37.9375em; height: 9.1875em;"/></div></td></tr></table></div><p class="example-text">Obtain the total number of parameters:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[14]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/3c477d55cb3772bf.png" alt="NetInformation[ NetModel["Wolfram JavaScript Character-Level Language Model V1"], \ "ArraysTotalElementCount"]" width="541" height="43" style="width: 33.8125em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[14]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/1dd6142355bf5c90.png" width="49" height="17" style="width: 3.0625em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Obtain the layer type counts:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[15]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/389940dbb0212f2d.png" alt="NetInformation[ NetModel["Wolfram JavaScript Character-Level Language Model V1"], \ "LayerTypeCounts"]" width="541" height="43" style="width: 33.8125em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[15]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/1123b4bc029ca0ab.png" width="378" height="39" style="width: 23.6250em; height: 2.4375em;"/></div></td></tr></table></div><p class="example-text">Display the summary graphic:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[16]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/6d5d76dbf00c5d7a.png" alt="NetInformation[ NetModel["Wolfram JavaScript Character-Level Language Model V1"], \ "FullSummaryGraphic"]" width="541" height="43" style="width: 33.8125em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[16]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/0c59c7f8fdbb6b07.png" width="491" height="41" style="width: 30.6875em; height: 2.5625em;"/></div></td></tr></table></div></div><div class="subsection cell-group"><h3>Export to MXNet</h3><p class="example-text"><span class="inline-formula"><a class="reflink" href="https://reference.wolfram.com/language/ref/Export">Export</a></span> the net into a format that can be opened in MXNet:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[17]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/74b2775b7cb754b2.png" alt="jsonPath = Export[FileNameJoin[{$TemporaryDirectory, "net.json"}], NetModel["Wolfram JavaScript Character-Level Language Model V1"], "MXNet"]" width="527" height="43" style="width: 32.9375em; height: 2.6875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[17]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/09fddef74411dd8e.png" width="369" height="17" style="width: 23.0625em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text"><span class="inline-formula"><a class="reflink" href="https://reference.wolfram.com/language/ref/Export">Export</a></span> also creates a <i>net.params </i>file containing parameters:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[18]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/102ab4534756666b.png" alt="paramPath = FileNameJoin[{DirectoryName[jsonPath], "net.params"}]" width="443" height="19" style="width: 27.6875em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[18]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/06453b78e2017452.png" width="387" height="17" style="width: 24.1875em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">Get the size of the parameter file:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[19]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/7efa046998787966.png" alt="FileByteCount[paramPath]" width="168" height="19" style="width: 10.5000em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[19]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/211a86c6d02f45e6.png" width="55" height="17" style="width: 3.4375em; height: 1.0625em;"/></div></td></tr></table></div><p class="example-text">The size is similar to the byte count of the resource object:</p><div class="example-frame"><table class="example input"><tr><td class="in-out">In[20]:=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/20e0b60d15ee150d.png" alt="ResourceObject[ "Wolfram JavaScript Character-Level Language Model V1"]["ByteCount"]" width="562" height="19" style="width: 35.1250em; height: 1.1875em;"/></div></td></tr></table><table class="example output"><tr><td class="in-out">Out[20]=</td><td><div class="img-frame"><img src="https://www.wolframcloud.com/obj/resourcesystem/images/e87/e87b2d82-bf19-41b9-9a45-2478a21dbbad/6fa77213067ae713.png" width="55" height="17" style="width: 3.4375em; height: 1.0625em;"/></div></td></tr></table></div></div></div><!-- RS_SHINGLE_EXAMPLE_SECTION_END --> <div id="notebookButtons" class="construction"> <h2 id="Construction-notebook">Construction Notebook</h2> <p> <a href="https://www.wolframcloud.com/download/82c7b8f4-ad3e-4b4a-8c76-6858656867be?extension=always&filename=Wolfram-JavaScript-Character-Level-Language-Model-V1" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Download Construction Notebook" > <svg id="iconGroup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 34" class="notebook-download" width="26" height="32" role="presentation" > <path class="fill" fill="#598527" d="M16.67276,8.65568A1.26126,1.26126,0,1,1,15.4115,7.39442,1.26126,1.26126,0,0,1,16.67276,8.65568ZM15.4115,12.655a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,15.4115,12.655Zm0,4.99574A1.26126,1.26126,0,1,0,16.67276,18.912,1.26126,1.26126,0,0,0,15.4115,17.65072Zm0,4.99574a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,15.4115,22.64646Zm7.24962-10.2563a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,22.66112,12.39016Zm0,5.52537a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,22.66112,17.91553ZM6.83888,9.89229a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,9.89229Zm0,5.26055a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,15.15285Zm0,5.26055a1.26126,1.26126,0,1,0,1.26126,1.26126A1.26126,1.26126,0,0,0,6.83888,20.4134ZM24.5,1A2.48819,2.48819,0,0,1,27,3.5v27A2.47572,2.47572,0,0,1,24.5,33H4.5A2.48819,2.48819,0,0,1,2,30.5V30H1V27H2V26H1V23H2V22H1V19H2V18H1V15H2V14H1V11H2V10H1V7H2V6H1V3H2.04A2.51946,2.51946,0,0,1,4.5,1ZM4.46,1.96a1.50243,1.50243,0,0,0-1.5,1.52V29.53a1.50243,1.50243,0,0,0,1.52,1.5H24.52a1.50243,1.50243,0,0,0,1.5-1.52V3.48a1.50243,1.50243,0,0,0-1.52-1.5H4.5Z" /> <path class="stroke" fill="none" stroke="#598527" stroke-miterlimit="10" stroke-width="0.25px" d="M7.0766,11.391l8.3349-2.51153M7.0766,16.41411l8.3349-2.51153M7.0766,21.43717l8.3349-2.51153m0,5.02306,7.0119-5.02306M15.4115,8.87952l7.0119,5.02306M7.0766,11.391l8.3349,2.51153m0,5.02306L7.0766,11.391m0,0L15.4115,23.9487M7.0766,16.41411l8.3349-7.53459M7.0766,21.43717,15.4115,8.87952M7.0766,16.41411l8.3349,2.51153m0-5.02306L7.0766,21.43717m0-5.02306,8.3349,7.53459m0-5.02306,7.0119-5.02306m-7.0119,0h7.0119m-7.0119,5.02306h7.0119M15.4115,23.9487l7.0119-10.04612M15.4115,8.87952l7.0119,10.04612m-7.0119-5.02306,7.0119,5.02306M7.0766,21.43717l8.3349,2.51153" /> </svg> <span class="text" ><span class="line">Download Construction </span ><span class="line">Notebook</span></span > </a> </p> <p> <a href="https://www.wolframcloud.com/env/82c7b8f4-ad3e-4b4a-8c76-6858656867be?src=CloudBasicCopiedContent#sidebar=basic-notebook-links" target="notebookButton" data-toggle="tooltip" data-placement="bottom" title="Open in Wolfram Cloud" > <svg xmlns="http://www.w3.org/2000/svg" class="cloud-open construction" width="41" height="32" viewBox="0 0 64 50" role="presentation" > <path class="stroke" fill="none" stroke="#598527" stroke-width="2" stroke-linecap="round" d="M22 42h30c6.08 0 11-4.92 11-11 0-3.85-2.03-7.42-5.33-9.4.22-.7.33-1.4.33-2.1 0-3.87-3.13-7-7-7-.43 0-.86.04-1.3.12C48.35 5.86 42.4 1 35.5 1c-4.74 0-9.18 2.32-11.9 6.2-1.3-.45-2.7-.7-4.1-.7C12.6 6.5 7 12.1 7 19c0 .87.1 1.73.28 2.57C3.45 23.4 1 27.27 1 31.5c0 3.92 2.1 7.54 5.5 9.5" /> <path class="fill" fill="#598527" d="M22.5 19.1L45 20 28.3 35l1-5.5c-5.24 2.27-13.42 9.74-16.1 19.8l-.6-.1c0-12.6 7.6-20.76 14.5-26.3z" /> </svg> <span class="text" ><span class="line">Open in </span ><span class="line">Wolfram Cloud</span></span > </a> </p> </div> <h2 id="WLVersion">Requirements</h2> <p> <a href="http://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn113.html"> Wolfram Language 11.3 </a> (March 2018) or above </p> <h2 id="Resource-History">Resource History</h2> <ul class="source-metadata"> <li> Date Created: <span class="property">7 May 2018</span> </li> <li> Latest Update: <span class="property">2 January 2019</span> </li> </ul> <h2 id="Reference">Reference</h2> <ul class="reference"> <li> <span> Wolfram Research </span> </li> </span></li> </ul> <footer id="bottom"> <ul> <li> <a href="https://resources.wolframcloud.com/NeuralNetRepository/contact-us" class="contact"> <svg viewBox="0 0 44 32"> <path d="M19 .5A6.5 6.5 0 0 0 12.5 7v4.5H.46l12.04 8.75V25a6.5 6.5 0 0 0 6.5 6.5h18a6.5 6.5 0 0 0 6.5-6.5V7A6.5 6.5 0 0 0 37 .5zm0 1h18A5.5 5.5 0 0 1 42.5 7v18a5.5 5.5 0 0 1-5.5 5.5H19a5.5 5.5 0 0 1-5.5-5.5v-5.25L3.54 12.5h9.96V7A5.5 5.5 0 0 1 19 1.5z" /> <path d="M18 6h20v4H18zM18 14h20v4H18zM18 22h10v4H18z" /></svg ><span class="text">Give Feedback</span> </a> </li> <li> <a href="#top" class="top"> <svg viewBox="0 0 16 16"> <path d="M4 0C1.784 0 0 1.784 0 4v8c0 2.216 1.784 4 4 4h8c2.216 0 4-1.784 4-4V4c0-2.216-1.784-4-4-4H4zm4 3l4 4-1 1-3-3-3 3-1-1 4-4zm0 5l4 4-1 1-3-3-3 3-1-1 4-4z" /></svg ><span class="text">Top</span> </a> </li> </ul> </footer> </div> </div> </main> <footer id="gws-footer"> <div class="wrap"> <p> © 2025 <a href="https://www.wolfram.com/" target="gws-footer">Wolfram</a>. All rights reserved. </p> <ul> <li> <a href="https://www.wolfram.com/legal/terms/wolfram-cloud.html" target="gws-footer" > Legal </a> & <a href="https://www.wolfram.com/legal/privacy/wolfram-cloud.html" target="gws-footer" > Privacy Policy </a> </li> <li> <a href="https://resources.wolframcloud.com/forms/contact" target="gws-footer" > Contact Us </a> </li> <li> <a href="https://www.wolframalpha.com/" target="gws-footer"> WolframAlpha.com </a> </li> <li> <a href="https://www.wolframcloud.com/" target="gws-footer"> WolframCloud.com </a> </li> </ul> </div> </footer> <script src="https://www.wolframcdn.com/javascript/jquery-2.1.4.min.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/shingle.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/header-and-results.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/react-autocomplete.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/main.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-libraries.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/NeuralNetRepository/5.0.0/results-list.js"></script> <script src="https://www.wolframcloud.com/obj/resourcesystem/webresources/resourcesystem/5.0.0/results-controller.js"></script> </body> </html>