Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/btrevizan/pyinverted
A inverted files implementation in Python 3.
https://github.com/btrevizan/pyinverted
Last synced: 9 days ago
JSON representation
A inverted files implementation in Python 3.
- Host: GitHub
- URL: https://github.com/btrevizan/pyinverted
- Owner: btrevizan
- License: mit
- Created: 2018-01-09T17:27:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-09T22:02:16.000Z (almost 7 years ago)
- Last Synced: 2024-07-06T02:31:33.077Z (4 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pyinverted
[![docs](https://readthedocs.org/projects/pyinverted/badge/?version=latest)](http://pyinverted.readthedocs.io/en/latest/?badge=latest)*pyinverted* implements a class for inverted files creation and managing.
First, the class creates/opens a file `.dict`. This file has the inverted file
dictionary saved with Python's [*pickle*](https://docs.python.org/3.2/library/pickle.html).
The dictionary is structed as `: `.Second, the class also creates/opens another file: `.inv`. This file has a list of `values` for
each `key`.This implementation can be used as a searching tool for records in a file.
## Installation
```bash
$ pip3 install pyinverted
```## Example
```python
from pyinverted import Inverted# Open two files: names.dict, names.inv
inv = Inverted('names')# Return all values associated with PEANUT
peanut = inv.get('PEANUT')
```## Docs and stuff
You can find docs, api and examples in [here](http://pyinverted.readthedocs.io/en/latest/).