Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexcg1/executor-chunk-level-equalizer

Put all text chunks on doc.chunks level, not lower traversal levels
https://github.com/alexcg1/executor-chunk-level-equalizer

Last synced: 16 days ago
JSON representation

Put all text chunks on doc.chunks level, not lower traversal levels

Awesome Lists containing this project

README

        

# ChunkLevelEqualizer

Put all text chunks on doc.chunks level, not lower traversal levels. Used in [PDF search example](https://medium.com/jina-ai/building-an-ai-powered-pdf-search-engine-with-python-part-1-9102654e6ea1?source=collection_home---------0----------------------------)

Note: This REMOVES all top-level text chunks from doc.chunks and then moves all lower-level text chunks to doc.chunks

## Usage

#### via Docker image (recommended)

```python
from jina import Flow

f = Flow().add(uses='jinahub+docker://ChunkLevelEqualizer')
```

#### via source code

```python
from jina import Flow

f = Flow().add(uses='jinahub://ChunkLevelEqualizer')
```

- To override `__init__` args & kwargs, use `.add(..., uses_with: {'key': 'value'})`
- To override class metas, use `.add(..., uses_metas: {'key': 'value})`