Skip to main content

Yoctol Text Indexer

Project description

# text-indexer

[![Build Status](https://travis-ci.org/Yoctol/text-indexer.svg?branch=master)](https://travis-ci.org/Yoctol/text-indexer)
[![PyPI version](https://badge.fury.io/py/text-indexer.svg)](https://badge.fury.io/py/text-indexer)

Indexer transforms list of strings to list of integers according to the string2int mapping function(e.q. a look-up table).

## Getting Started

### Prerequisites

1. Please create a virtual environment with python 3.6
2. Type the following command in terminal:
```
make install
```

### Running the tests

```
make test
```

## How to completely save and load indexer?

### 1. Save
```python
from text_indexer.io import save_indexer
custom_indexer_instance = XXIndexer()
save_indexer(indexer=custom_indexer_instance, output_dir='directory-to-export-indexer')
```
If output_dir is `/home/user/example/`, you will get a tar file `/home/user/example-all.tar.gz` after calling
`save_indexer`.

### 2. Load
```python
from text_indexer.io import load_indexer
your_indexer = load_indexer(path='indexer-tar-filepath')
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text-indexer-1.1.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

text_indexer-1.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file text-indexer-1.1.0.tar.gz.

File metadata

  • Download URL: text-indexer-1.1.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for text-indexer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5c0a92f27ba559a96bb685269e4950d32b44a6ad497df73cd9183cf360138622
MD5 86f22e411db7bffc5f63a8c49259c392
BLAKE2b-256 c85a0cce590482b54606e79328bbd4ecd3275f44eea49661a8ffd781a6692e81

See more details on using hashes here.

File details

Details for the file text_indexer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: text_indexer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for text_indexer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6ce72f804c36e7f02302f55039184dd653b441c4f35d2327451229798ceeeb
MD5 4e090a8a29c2bfeb05b502b7b58df4ce
BLAKE2b-256 3b8058fd4c5f3b464630d1621d4b7dcba3d69f58651f696f2a8ad7c405f91fa9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page