Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alexcg1/executor-chunk-level-equalizer
- Owner: alexcg1
- Created: 2022-05-10T09:03:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T09:26:00.000Z (over 2 years ago)
- Last Synced: 2024-10-16T03:41:17.408Z (about 1 month ago)
- Language: Python
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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})`