Extract keywords from sentences.
Project description
========= ValleyText
This tool can be used to extract keywords from sentences without chunks or word boundaries (for example, Chinese). It is based on trie tree optimized by AhoCorasick Automation.
Installation
::
$ pip install valleytext
Usage
Extract keywords >>> from valleytext import create_trie >>> words_dict = {'设备': ['GPS', '设备']} >>> extractor = create_trie(words_dict, False) >>> extracts = extractor.extract_keywords_from_text('我有一台gps设备') >>> extracts >>> # [(4, 7, 'gps', '设备'), (7, 9, '设备', '设备')]
License
The project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file valleytext-0.1.tar.gz.
File metadata
- Download URL: valleytext-0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa69813d8cb5b7fb0dc29133b470e12c599173b6617b1cec441c784a1703977
|
|
| MD5 |
74537c8f12c706e5341cc19e01d990b9
|
|
| BLAKE2b-256 |
5b2bc4e4a4588884913aa78dc356968cdee22db55bfba49a0c05c07f07760dbc
|
File details
Details for the file valleytext-0.1-py3-none-any.whl.
File metadata
- Download URL: valleytext-0.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14901db2dece159a011d1a026aa6854d7f2872b2ec077e626882a3e44c1b611a
|
|
| MD5 |
d103f6d362e991f91169b2e51d7f2fc2
|
|
| BLAKE2b-256 |
1a6898e4ac39cfc29cd6de88962aafb805569b17c3080d860203315fbb62db72
|