jatool
A Python package to download and downstream-analysis the Japanese literatures.
Install
pip install jatool
#You need to install Rust to install depandency 'SudachiPy'
##Linux##
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
##MacOS##
brew install rustup
rustup-init
load jatool package
from jatool.function import *
Download literatures
You need to input the author and output path. Using ja_download_fiction_author() function. Example:
ja_download_fiction_author(author = '島崎藤村',output_path='fiction_download')
Topic model (LDA)
You need to input the path which contains the txt files. Using topic_model_fition_corpus() and topic_model_fition_text(). Example:
excleded_words = [] #You can choose excleded_words to adjust the Topic model results.i.e. excleded_words = ['人','事','ぬ','やう']
topic_result = topic_model_fition_corpus(folder_path = 'fiction2',topics_num=2,added_stopwords = excleded_words)
#You can adjust the Topic model results using different 'topics_num' parameter.
topic_model_fition_text(input_corpus = topic_result,topics_num=3)
Clustering analysis
You need to input the path which contains the txt files. Using get_features_path() and feature_clustering(). Example:
features = get_features_path(folder_path = 'fiction_download')
df = feature_clustering(feature_list_result = features,clusters_n =3)
#if plot can't show correctly the japanese words, please install the japanese font, for example 'Yu Gothic'
#Here is the code for font changing
# fpath = '/Your/Fonts/directory/YuGothic.ttf'
# prop = fm.FontProperties(fname=fpath)
# font_dir = ['/Your/Fonts/directory/']
# for font in fm.findSystemFonts(font_dir):
# fm.fontManager.addfont(font)
# plt.rcParams['font.family'] = 'Yu Gothic'
Emotion analysis
You need to input the specific text. Using get_sentiment_analyzer(). Example:
sentiment_analyzer = get_sentiment_analyzer()
sentiment_analyzer("私は幸福である。")
Translation
You need to input the specific text. Using translation_from_jp_to_en(), translation_from_jp_to_cn(), translation_from_lan_to_jp. Example:
translation_from_jp_to_en("私は幸福である。")
translation_from_jp_to_cn("私は幸福である。")
translation_from_lan_to_jp('I am happy.')
Metadata
Release files for jatool 1.992
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jatool-1.992.tar.gz | 6.1 MB | Without provenance | Details for jatool-1.992.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jatool-1.992-py3-none-any.whl | Python 3 | none | any | Details for jatool-1.992-py3-none-any.whl |
Total release size: 8.1 MB
Release files / jatool-1.992.tar.gz
| Download URL | jatool-1.992.tar.gz |
|---|---|
| Size | 6.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffd9c9590b50dd4274cad3abc499dbb330b0f263a36883a77b46734c86be56fd
|
|
BLAKE2b-256 checksum How to use checksums |
28c503c777bcac2c4b6d5fac7684834d278e8b3459e90d56aa4dd6a9b103d3c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / jatool-1.992-py3-none-any.whl
| Download URL | jatool-1.992-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef9f88e4e2a9c80ce8cf28bdaab4281dd3fb3c1719fd8482b98cca69b4ae1fc2
|
|
BLAKE2b-256 checksum How to use checksums |
25b5044f651375c005e4afcfee1f906c17097debc4e2392fbae2481253cc78ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for jatool 1.992
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.