Skip to main content

String Feature Extraction

Project description

This is the string feature extracting project for later maching learning algorithms.


import string_demon as sd

str1 = "我住在北方,夜晚听见窗外的雨声,让我想起了南方。May the force be with you....""
print sd.spam_check(str1)

> (0.9047619047619048, 2.6246719160104988, 4.833333333333333, 0.7241379310344828)
return refer to: (中文重复率,中文停顿长度,英文停顿长度,中英文长度比)

import string_demon as sd

str2 = "我住在南方,我住在南方。"

print sd.lcs_check(str2)

> (2, '\xe6\x88\x91\xe4\xbd\x8f\xe5\x9c\xa8\xe5\x8d\x97\xe6\x96\xb9', 5)
> return refer to: (重复次数,LCS,LCS.length)

Project details

Download files

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

Files for string-demon, version 0.2.50
Filename, size File type Python version Upload date Hashes
Filename, size string_demon-0.2.50.tar.gz (6.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page