Metadata-Version: 2.4
Name: NLEParser
Version: 0.2.5
Summary: A Natural Language processing parser for Zork-style games
Author: NatanLang
Author-email: natanrcorreiatr@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-python
Dynamic: summary

# Natan Logical Engine (NLE)

## Overview

Natan Logical Engine (NLE) is a simple natural language parser designed to interpret player commands in text-based games or interactive fiction. It processes input strings, removes stop words, resolves pronouns based on context, and extracts structured commands (verb and object) from user input.

## Features

- **Stop Word Removal:** Ignores common words that do not affect command meaning.
- **Pronoun Resolution:** Substitutes pronouns with the last referenced object for contextual understanding.
- **Syntactic Analysis:** Identifies verbs and objects from the input and returns structured commands.
- **Logging:** Provides detailed debug and info logs for development and debugging.

## Usage

Example usage in Python:

```python
from NLEParser.parser import NLEParser

config = {
    "language": "en-us",
}
vocabulary = {
    "pronouns": {"he", "she", "it", "this", "that"},
    "verbs": {"take", "look", "use"},
    "objects": {"key", "door", "box"},
}
stop_words = {"the", "a", "an", "of", "in", "on", "at", "to"}

parser = NLEParser(config, vocabulary, stop_words)

parsed_command = parser.parse("take the key")
print(parsed_command)  # Output: {'verb': 'take', 'object': 'key'}
```
