apie/count-words
Count word frequencies in strings or streams/files with Apie\CountWords\WordCounter. Returns an array of lowercase words mapped to their occurrence count. Supports processing large files via resources (as long as the index fits in memory).
php artisan analyze:keywords posts/*).TextAnalysisService).SplFileObject) or queue-based processing (e.g., Laravel queues + database storage).nltk, Ruby’s Roo) via a microservice or API.*"This package lets us add lightweight word-counting features—like keyword density tracking or content quality checks—without heavy dependencies or cloud costs. For example:
It’s MIT-licensed, integrates seamlessly with Laravel, and avoids vendor lock-in. Since it’s pure PHP, we can extend it later if needed—saving dev time and reducing costs vs. building from scratch or using paid APIs."*
Pros:
WordCounter) with two methods (countFromString, countFromResource). Easy to integrate.Cons:
Recommendation: Use this for MVP features where basic word counts suffice. Pair it with a roadmap item to replace it with a more robust NLP tool (e.g., PHP-ML) if we need advanced features later. For now, it’s a low-risk, high-reward way to add text analytics without over-engineering."*
Example Use Cases to Highlight:
How can I help you explore Laravel packages today?