forked from AOT-Technologies/forms-flow-ai-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsentiment_analysis.html
97 lines (87 loc) · 4.8 KB
/
sentiment_analysis.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<article class="docs-article">
<section class="docs-section" id="sentiment_analysis">
<div>
<h1>Sentiment Analysis</h1>
<hr><br>
<p>Sentiment analysis is used to understand the customer's sentiments toward products, movies, and other
such things, whether they feel positive, negative, or neutral about it. BERT is a perfect pre-trained
language model which helps machines learn excellent representations of text with respect to the context
in many natural language tasks.
</p><br>
<h3>Data Analysis API<a href="https://github.com/AOT-Technologies/forms-flow-ai/tree/develop/forms-flow-data-analysis-api">(link to data-analysis-api folder)</a></h3>
<p>Data Analysis API is used to understand the customer's sentiments whether they feel positive, negative,
or neutral about it. </p>
<p>Make sure your current working directory is <code> cd {Your Directory}/forms-flow-ai/forms-flow-data-analysis-api</code></p>
<p>This feature requires the following env:</p>
<pre><code>
DATA_ANALYSIS_API_BASE_URL=http://{your-ip-address}:{port}
</code></pre><br>
<h4>POST API for sentiment analysis</h4><br>
<h5><i>POST</i></h5>
<code>{{DATA_ANALYSIS_API_BASE_URL}}/sentiment.</code>
<br><br>
<u>
<h5>HEADERS</h5>
</u>
<p><strong> Authorization Bearer</strong> {{token}}</p>
<p><strong> Content-Type</strong> application/json</p>
<u>
<h5>BODY</h5>
</u>
<pre>
<code>
{
"applicationId":"{valid applicationId}",
"formUrl":"{valid formUrl}",
"data":[{
"text":"bad service",
"elementId":""
}]
}
</code>
</pre>
<u>
<h5>RESPONSE</h5>
</u>
<pre>
<code>
{
"overallSentiment": "NEGATIVE"
}
</code>
</pre>
<br>
<h4>Model description <a href="https://huggingface.co/Seethal/sentiment_analysis_generic_dataset">(https://huggingface.co/Seethal/sentiment_analysis_generic_dataset)</a></h4>
<p>This is a fine-tuned downstream version of the bert-base-uncased model for sentiment analysis, this model
is not intended for further downstream fine-tuning for any other tasks. This model is trained on a
classified dataset for text classification.</p>
<h4> How to use the Sentiment Analysis component</h4>
<p>One of the unique features of the formsflow.ai framework is Sentiment Analysis. It can analyze the
sentiment from forms based on specific topics mentioned by the designer during form creation.</p>
<ul>
<li>A form designer can drag and drop Text Area with Analytics component and associated with the
corresponding workflow. This activates the sentiment analysis component.
</li><br>
<img src="./assets/images/sentiment1.png" width="800" height="300"><br><br>
<li>Based on the input responses of the user, formsflow.ai process sentiment associated with each user's
responses and the response will be patched to submission data by the Camunda listener. For this it requires the following env:
</li>
<br><pre><code>
DATA_ANALYSIS_URL=http://{your-ip-address}:{port}/analysis
</code></pre>
<li>The workflow associated with sentiment analysis, you need to add the java class in listeners as</li>
<code>`org.camunda.bpm.extension.hooks.delegates.FormTextAnalysisDelegate`</code>
<p>Refer to the sample shown below:</p> <br>
<img src="./assets/images/sentiment2.png" width="1000" height="500"><br><br>
</ul>
<div class="callout-block callout-block-info">
<div class="content">
<span class="callout-icon-holder me-1"></span>
<i class="fa fa-bullhorn"></i>
<em> NOTE: Refer here (<a href="https://huggingface.co/docs/transformers/index">https://huggingface.co/docs/transformers/index</a>) for model creation and training procedures </em>
</div>
</div>
</div>
</section>
</article>
<script>hljs.initHighlighting();</script>