{% extends "layout.html" %} {% block content %}

Quantum NLP Framework

A multi-dimensional, layered thinking process inspired by quantum computing concepts


This framework combines natural language processing with a recursive function that simulates quantum-inspired thinking processes, creating a multi-dimensional analysis of your text. Additionally, it can leverage OpenAI's API to generate human-like text responses based on the quantum analysis.

Input Text

{% if nlp_results %}

NLP Analysis Results

Text Statistics
Word count: {{ nlp_results.stats.word_count }}
Sentence count: {{ nlp_results.stats.sentence_count }}
Average sentence length: {{ nlp_results.stats.average_sentence_length }} words
Top Terms
    {% for term, freq in nlp_results.top_terms %}
  • {{ term }} {{ freq }}
  • {% endfor %}
Named Entities
{% if nlp_results.entities %}
    {% for entity in nlp_results.entities[:5] %}
  • {{ entity.text }} {{ entity.label }}
  • {% endfor %}
{% else %}

No named entities detected

{% endif %}
{% endif %} {% if quantum_results %}

Quantum Thinking Results

Meta-Insight:

{{ quantum_results.meta_insight }}

{{ quantum_results.quantum_score }}

Quantum Score

Dimension Level: {{ quantum_results.dimension }}
Quantum Paths: {{ quantum_results.paths|length }}
{% for path in quantum_results.paths %}

Insight:

{{ path.insight }}

Prompt:

{{ path.prompt }}

{% if path.entangled_insight %}
Quantum Entanglement:
Entangled with Path: {{ path.entangled_with }}

{{ path.entangled_insight }}

{% endif %} {% if path.sub_dimensions and path.sub_dimensions.paths %}
Sub-dimensions:
{% for subpath in path.sub_dimensions.paths[:2] %}
{{ subpath.concept }}

{{ subpath.insight }}

{% endfor %}
{% endif %}
{% endfor %}
{% endif %} {% if ai_response %}

AI Analysis

{% if ai_response.error %}
OpenAI API Error

{{ ai_response.error }}

Get OpenAI API Key
{% else %}
Response from {{ ai_response.model }}
AI-Generated
{{ ai_response.text | safe | replace('\n', '
') }}
{% endif %}
{% endif %}
{% endblock %}