from flask import Flask, request, jsonify
    from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer

    app = Flask(__name__)
    analyzer = SentimentIntensityAnalyzer()

    @app.route('/nlu/analyze', methods=['POST'])
    def analyze_text():
        data = request.get_json()
        text = data.get('text')

        if not text:
            return jsonify({'error': 'Missing text parameter'}), 400

        # Existing NLU logic (intent and entity extraction)

        # Add sentiment analysis
        vs = analyzer.polarity_scores(text)
        sentiment = "Positive" if vs['compound'] > 0.05 else "Negative" if vs['compound'] < -0.05 else "Neutral"

        return jsonify({
            'intent': 'unknown', # Replace with actual intent
            'entities': {},  # Replace with actual entities
            'sentiment': sentiment
        })

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0')