1. Go to this page and download the library: Download moayadmgh/text-perfection library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moayadmgh / text-perfection example snippets
use Moayadmgh\TextPerfection\TextPerfection;
$content = 'TextPerfection is a powerful text analysis and manipulation plugin for PHP. It provides various functionalities to analyze, format, and detect plagiarism in text content.';
$TextPerfectionObj = new TextPerfection($content);
$textPerfectionResult = $TextPerfectionObj->get();
use Moayadmgh\TextPerfection\ContentRewriter;
$content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
$rewriter = new ContentRewriter();
$rewriter->rewrite($content);
$rewrittenContent = $rewriter->getNewContent();
echo $rewrittenContent . PHP_EOL;
use Moayadmgh\TextPerfection\TextFormatter;
$content = "# This is going to be H1\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit.\n\n- List item number 1\n- List item number 2";
$formatter = new TextFormatter();
$formatter->format($content);
$formattedContent = $formatter->getFormattedText();
echo $formattedContent . PHP_EOL;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.