File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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.' ) ;
You can’t perform that action at this time.
0 commit comments