Skip to content

Commit 7fc8a5c

Browse files
Update generate.js
GNh
1 parent c371954 commit 7fc8a5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/generate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ document.addEventListener('DOMContentLoaded', () => {
5454
const obstacle = document.getElementById('obstacle').value.trim();
5555
const pathway = document.getElementById('pathway').value.trim();
5656
const sentiment = document.getElementById('sentimentScore').innerText || 'Sentiment Score: [not analyzed]';
57-
const sentimentScore = parseInt(sentiment.match(/\d+/)) || 5;
57+
const sentimentScore = analyzeSentiment(obstacle);
58+
document.getElementById('sentimentScore').innerText = `Sentiment Score: ${sentimentScore}/10`;
59+
const gnhAnalysis = analyzeGNHMeaning(meaning, gnh);
60+
resultText += `- GNH Sentiment: ${gnhAnalysis.sentiment} (${gnhAnalysis.score}/10)\n\n`;
61+
5862

5963
if (!pathway) {
6064
alert('Please select a pathway.');

0 commit comments

Comments
 (0)