https://github.com/becklyn/searchtexttransformer
A library that extracts plain text from HTML for usage in search engines (like Elasticsearch)
https://github.com/becklyn/searchtexttransformer
Last synced: about 1 month ago
JSON representation
A library that extracts plain text from HTML for usage in search engines (like Elasticsearch)
- Host: GitHub
- URL: https://github.com/becklyn/searchtexttransformer
- Owner: Becklyn
- License: bsd-3-clause
- Created: 2016-12-09T14:41:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T10:41:04.000Z (over 2 years ago)
- Last Synced: 2025-03-24T20:21:34.801Z (2 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Search Text Transformer
=======================Transforms HTML to searchable plain text for usage in conjunction with a search engine (like Elasticsearch).
Installation
------------Install via composer.
Usage
-----```php
transform("Some HTML content
");
```Testing
-------All test cases belong into `tests/fixtures` and must have the file extension `.test`.
The test format is:
```
--TEST--
Here is a plain text description of this test.
--HTML--Some html.
--EXPECT--
The expected result.
```The `--TEST--` segment is optional.