SO text processing
Project description
# Python module for string matching ONLY TESTED WITH PYTHON 3.5+.
# Installation ` pip install so-processing `
# Usage ` df = pd.read_parquet('sse.parquet') ` Text is stemmed and preprocessed
` import so_textprocessing as stp tp = stp.TextPreprocess(strlist='targetwords.txt') df = tp.transform_df(df) ` Adds new columns. transform_df() uses reformat=’summary’ by default.
# Reformat Options `df = tp.transform_df(df, reformat='raw')` returns raw aho-corasick output
`df = tp.transform_df(df, reformat='index')` returns raw string matches with start/end indexes
`df = tp.transform_df(df, reformat='words')` returns list of raw words (as orignal, unstemmed words)
`df = tp.transform_df(df, reformat='summary')` (default): returns unique_count, raw_count, words, len and ratio. Only keeps longest string if a substring exists. e.g. ‘time bomb’ will only count ‘time bomb’ and not ‘bomb’.
`df = tp.transform_df(df, reformat='full')` same as summary, but when used in transform_df, it also processes+stems the text of the dataframe. Slowest option.
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
File details
Details for the file so_processing-0.2.tar.gz.
File metadata
- Download URL: so_processing-0.2.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c9f9b6cbdaa8f5f3dfb08da0af791331f422066793dd64af9011cbd9f35186b
|
|
| MD5 |
3ee9a30884ce01906b7cd1cedcbbc7e0
|
|
| BLAKE2b-256 |
21c895ad709aa2ab3192dfc0a8a36935f19bc0e565a10afd5757c7682a9e4fad
|