========= 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.
Release files for valleytext 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| valleytext-0.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| valleytext-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / valleytext-0.1.tar.gz
| Download URL | valleytext-0.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fa69813d8cb5b7fb0dc29133b470e12c599173b6617b1cec441c784a1703977
|
|
BLAKE2b-256 checksum How to use checksums |
5b2bc4e4a4588884913aa78dc356968cdee22db55bfba49a0c05c07f07760dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / valleytext-0.1-py3-none-any.whl
| Download URL | valleytext-0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14901db2dece159a011d1a026aa6854d7f2872b2ec077e626882a3e44c1b611a
|
|
BLAKE2b-256 checksum How to use checksums |
1a6898e4ac39cfc29cd6de88962aafb805569b17c3080d860203315fbb62db72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|