Metadata-Version: 2.4
Name: langgraph-tavily
Version: 0.1.0
Summary: Language analyser for trivia questions — parse, classify, and score question difficulty
Project-URL: Homepage, https://github.com/brnv/langgraph-tavily
Author-email: Artem <brnv@canva.com>
License-Expression: MIT
License-File: LICENSE
Keywords: language,nlp,question-analysis,quiz,trivia
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# langgraph-tavily

Language analyser for trivia questions. Parse, classify, and score question difficulty using linguistic features.

## Installation

```bash
pip install langgraph-tavily
```

## Usage

```python
from langgraph_tavily import TriviaAnalyser, TriviaGenerator

# Analyse a question
analyser = TriviaAnalyser()
result = analyser.analyse("What ancient wonder was located in Alexandria?")
print(result.difficulty)        # hard
print(result.question_type)     # what
print(result.category)          # history
print(result.difficulty_score)  # 0.52
print(result.keywords)          # ['ancient', 'wonder', 'located', 'alexandria']

# Compare two questions
cmp = analyser.compare(
    "What color is the sky?",
    "In what year was the Treaty of Westphalia signed?"
)
print(cmp["harder"])  # q2

# Generate a quiz
gen = TriviaGenerator()
quiz = gen.quiz(count=10, mix=True)
for q in quiz:
    print(q.text)
```

## CLI

```bash
langgraph-tavily analyse "Who composed The Rite of Spring?"
langgraph-tavily analyse "What is 2+2?" --json
langgraph-tavily compare "What is the capital of France?" "Which element has atomic number 79?"
langgraph-tavily quiz --count 5 --difficulty medium --show-answers
langgraph-tavily batch questions.txt --json
```

## License

MIT
