PHPackages                             sundance-solutions/larachain-trim-text - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sundance-solutions/larachain-trim-text

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sundance-solutions/larachain-trim-text
======================================

This will help short text for prompts

1.0.1(3y ago)34.5kMITPHPPHP ^8.1

Since May 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alnutile/larachain-trim-text)[ Packagist](https://packagist.org/packages/sundance-solutions/larachain-trim-text)[ Docs](https://github.com/sundance-solutions/larachain-trim-text)[ RSS](/packages/sundance-solutions-larachain-trim-text/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (14)Versions (3)Used By (0)

This will help short text for prompts
=====================================

[](#this-will-help-short-text-for-prompts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e518bcb0e818004b707615916c7b40be73b8e460f232e3a57db943f16f47a9ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73756e64616e63652d736f6c7574696f6e732f6c617261636861696e2d7472696d2d746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sundance-solutions/larachain-trim-text)[![Fix PHP code style issues](https://github.com/alnutile/larachain-trim-text/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/alnutile/larachain-trim-text/actions/workflows/fix-php-code-style-issues.yml)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cd23c9fbe2d32c96e222e426f600b404b47dbc3142a392dea7bd551d85f1fbf5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73756e64616e63652d736f6c7574696f6e732f6c617261636861696e2d7472696d2d746578742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/sundance-solutions/larachain-trim-text/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/fc3217cbcfe101bb671eb99393ec002d96608df4917f808c1031b5d11ea92468/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756e64616e63652d736f6c7574696f6e732f6c617261636861696e2d7472696d2d746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sundance-solutions/larachain-trim-text)

This is basically a copy of a LangChain library that reduces the text so that an LLM can read it and it saves characaters. Some of the ideas can be seen [here](https://www.datacamp.com/tutorial/stemming-lemmatization-python)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require sundance-solutions/larachain-trim-text
```

Usage
-----

[](#usage)

```
