Array to sort worlds by word class in a text : <p>How can I make a script that sorts words in a text field by word class. Verb and adjectives etc. </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>array()</code></pre>
</div>
</div>
</p>
