Download the PHP package nigel/wit_parser without Composer
On this page you can find all versions of the php package nigel/wit_parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package wit_parser
Wit.ai Parser for Laravel
A Laravel package for interacting with Wit.ai's API, providing easy-to-use services for message parsing and entity/intent management.
Installation
-
Install the package via Composer:
-
Publish the configuration file:
- Add your Wit.ai credentials to your
.env
file:
Usage
Message Parsing
Managing Entities and Intents
Available Methods
WitParserService
parse(string $message): WitResult
- Parse a message and get structured data
WitManagerService
createEntity(string $name, array $values = []): array
- Create a new entitygetEntities(): array
- Get all entitiescreateIntent(string $name, array $examples = []): array
- Create a new intentgetIntents(): array
- Get all intentsgetAppInfo(): array
- Get app information
WitResult Object
The parse()
method returns a WitResult
object with the following properties:
intent
: The detected intentconfidence
: Confidence score (0-1)entities
: Array of detected entitiesraw
: Raw API response
Error Handling
The package throws RuntimeException
with descriptive messages for:
- API request failures
- Invalid responses
- Network errors
- Authentication issues
License
This package is open-sourced software licensed under the MIT license.
All versions of wit_parser with dependencies
PHP Build Version
Package Version
The package nigel/wit_parser contains the following files
Loading the files please wait ....