UNPKG

prisme-flow

Version:

prisme platform flow engine

42 lines (36 loc) 1.53 kB
<!-- Created by prisme.io on 09/06/2017. @author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io) --> <script type="text/x-red" data-template-name="sentiment"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> </div> </script> <script type="text/x-red" data-help-name="sentiment"> <p>Analyses the <code>msg.payload</code> and adds a <code>msg.sentiment</code> object that contains the resulting AFINN-111 sentiment score as <code>msg.sentiment.score</code>.</p> <p>A score greater than zero is positive and less than zero is negative.</p> <p>The score typically ranges from -5 to +5, but can go higher and lower.</p> <p>An object of word score overrides can be supplied as <code>msg.overrides</code>.</p> <p>See <a href="https://github.com/thisandagain/sentiment/blob/master/README.md" target="_blank">the Sentiment docs here</a>.</p> </script> <script type="text/javascript"> RED.nodes.registerType('sentiment',{ category: 'utility', color:"#E6E0F8", defaults: { name: {value:""}, }, inputs:1, outputs:1, icon: "sentiment.png", label: function() { return this.name||"sentiment"; }, labelStyle: function() { return this.name?"node_label_italic":""; } }); </script>