PHPackages                             endless-creativity/elephant-php-neuron - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. endless-creativity/elephant-php-neuron

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

endless-creativity/elephant-php-neuron
======================================

Neuron AI FileDataLoader reader for .docx files, powered by elephant-php.

v0.1.1(1mo ago)00BSD-2-ClausePHPPHP ^8.2

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/endless-creativity/elephant-php-neuron)[ Packagist](https://packagist.org/packages/endless-creativity/elephant-php-neuron)[ Docs](https://github.com/endless-creativity/elephant-php-neuron)[ RSS](/packages/endless-creativity-elephant-php-neuron/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

elephant-php-neuron
===================

[](#elephant-php-neuron)

A [Neuron AI](https://docs.neuron-ai.dev) `FileDataLoader` reader for `.docx`documents, powered by [elephant-php](https://github.com/endless-creativity/elephant-php).

Drop it into a Neuron RAG pipeline and `.docx` files become embeddable documents alongside the bundled PDF, HTML and plain-text readers.

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

[](#installation)

```
composer require endless-creativity/elephant-php-neuron
```

Requires PHP 8.2+. No external binaries needed (unlike `PdfReader`).

Usage
-----

[](#usage)

```
use NeuronAI\RAG\DataLoader\FileDataLoader;
use EndlessCreativity\ElephantPhpNeuron\DocxReader;

$documents = FileDataLoader::for(__DIR__.'/knowledge')
    ->addReader('docx', new DocxReader())
    ->getDocuments();

MyRAG::make()->addDocuments($documents);
```

Pass a directory and Neuron walks it, picking the right reader per extension; pass a single file to ingest just that one.

### Output format

[](#output-format)

By default the reader returns plain text via `Converter::extractRawText()` — paragraphs separated by `"\n\n"`, no markup. This is usually what you want for embeddings: less syntactic noise, more semantic signal per token.

If you'd rather preserve headings, lists and links — for example because your splitter or post-processor relies on Markdown structure — request Markdown explicitly through the reader options:

```
FileDataLoader::for($path)
    ->addReader('docx', new DocxReader())
    ->getDocuments(['format' => DocxReader::FORMAT_MARKDOWN]);
```

The `$options` array is forwarded by `FileDataLoader` to every reader, so the same flag is in effect for the whole loading pass.

Limitations
-----------

[](#limitations)

- Only OOXML `.docx` is supported. Legacy binary `.doc` (Word 97–2003) is not handled by elephant-php and therefore not by this reader either.
- Images embedded in the document are dropped during text extraction. This is intentional for RAG — embeddings are text-only.
- Conversion warnings emitted by elephant-php (`Result::messages`) are currently silenced. If you need them, open an issue.

License
-------

[](#license)

BSD-2-Clause. See [LICENSE](LICENSE).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6038939?v=4)[Matteo Milesi](/maintainers/mattmilesi)[@mattmilesi](https://github.com/mattmilesi)

---

Top Contributors

[![mattmilesi](https://avatars.githubusercontent.com/u/6038939?v=4)](https://github.com/mattmilesi "mattmilesi (4 commits)")

---

Tags

worddocxneuron-airagfile readerelephant-php

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/endless-creativity-elephant-php-neuron/health.svg)

```
[![Health](https://phpackages.com/badges/endless-creativity-elephant-php-neuron/health.svg)](https://phpackages.com/packages/endless-creativity-elephant-php-neuron)
```

###  Alternatives

[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3835.9M26](/packages/gotenberg-gotenberg-php)[mnvx/lowrapper

PHP wrapper over LibreOffice converter

127199.1k](/packages/mnvx-lowrapper)[vaites/php-apache-tika

Apache Tika bindings for PHP: extracts text from documents and images (with OCR), metadata and more...

1171.5M2](/packages/vaites-php-apache-tika)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

34169.4k](/packages/aspose-cloud-aspose-words-cloud)[novay/laravel-word-template

Package Laravel untuk melakukan penggantian kata pada file menggunakan template dokumen (.doc atau .docx) yang sudah disediakan.

5515.9k](/packages/novay-laravel-word-template)[paperdoc-dev/paperdoc-lib

A zero-dependency PHP library for generating, parsing and converting documents (PDF, HTML, CSV, DOCX)

1141.4k](/packages/paperdoc-dev-paperdoc-lib)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
