Skip to main content

Chinese text processing, representation, and visualization.

Project description

SimpleChinese

https://img.shields.io/pypi/v/simplechinese.svg https://img.shields.io/travis/chenmingxiang110/simplechinese.svg Documentation Status Updates

Chinese text processing, representation, and visualization.

Features

  1. Read the data from a csv file.

df = pd.read_csv("test.csv")
https://github.com/chenmingxiang110/SimpleChinese/raw/master/pics/raw.png
  1. Clean the data.

sc.clean(df)
https://github.com/chenmingxiang110/SimpleChinese/raw/master/pics/clean.png

The clean function does the following:

fillna(): Fill the N/As in a pandas.DataFrame with an empty string.

toLower(): Transform alphabets to their lowercases.

remove_punctuations(): Remove all the punctuations in a string or a pandas.DataFrame.

remove_space(): Remove all the spaces in a string or a pandas.DataFrame.

  1. Extract words from the data

sc.extract_words(sc.clean(df))
https://github.com/chenmingxiang110/SimpleChinese/raw/master/pics/extract_words.png
  1. Vectorization

sc.pca(sc.tfidf(sc.clean(df).iloc[:,0]))
https://github.com/chenmingxiang110/SimpleChinese/raw/master/pics/vectorization.png
  1. Word cloud

sc.wordcloud(sc.clean(df).iloc[:,0], font_path="yahei.ttc")
https://github.com/chenmingxiang110/SimpleChinese/raw/master/pics/wordcloud.png

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2020-07-10)

  • First release on PyPI.

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

simplechinese-0.1.0.tar.gz (13.6 kB view hashes)

Uploaded Source

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