yooper/php-text-analysis
PHP Text Analysis provides Information Retrieval and NLP tools in PHP: tokenization, normalization, stemming, frequency and n-gram analysis, document comparison, sentiment and classification, collocations (PMI), lexical diversity, corpus analysis, and summarization.
Architecture fit: The package is PHP-based and compatible with Laravel's ecosystem, but relies on global function helpers (TextAnalysis\Functions) which conflict with Laravel's dependency injection patterns. Core components (tokenizers, stemmers) are class-based but require manual instantiation, leading to potential tight coupling if not wrapped in service containers.
Integration feasibility: Composer installation is straightforward, but the stateful nature of classifiers (e.g., Naive Bayes) requires careful management of instance lifecycles in Laravel's request-response cycle. Some functions (e.g., vader()) have documented edge cases (e.g., short token inputs), which would need validation layers in Laravel middleware or controllers.
Technical risk: Low community adoption (0 dependents), minimal recent activity (last release Dec 2024—note: this date seems future-dated, but as given), and incomplete documentation (book in progress). The Vader implementation's instability in v1.4.1 suggests potential hidden bugs. No tests or CI pipelines visible in repo (Travis badge shows build status, but might be outdated).
Key questions:
Stack fit: Laravel's service container can
How can I help you explore Laravel packages today?