Skip to main content

SentimenX-BTC Package untuk menganalisis sentimen Bitcoin dari teks menggunakan preprocessing, tokenization, dan model machine learning.

Fitur Utama

  • Membersihkan teks dari noise seperti tanda baca dan angka.
  • Tokenisasi teks dengan padding otomatis.
  • Analisis sentimen menggunakan model machine learning terlatih.
  • Mendukung klasifikasi sentimen positif dan negatif.

Instalasi Gunakan pip untuk menginstal package ini: pip install sentimentX-btc

How to Use?

1. preprocessing(text)

Deskripsi:

Fungsi ini digunakan untuk membersihkan teks dari simbol atau karakter yang tidak diinginkan, mengubah teks menjadi huruf kecil, dan menghapus kata-kata berhenti (stop words). Fungsi ini mendukung input berupa string, pandas Series, atau list.

Parameter:

  • text: Input berupa string, pandas Series, atau list teks mentah yang akan diproses.

Output:

  • Mengembalikan teks yang telah diproses dalam bentuk pandas Series.

Contoh Penggunaan:

text = "Hello, world! This is a test."
processed_text = preprocessing(text)
print(processed_text)

2. tokenize_and_padding(text, max_len=0)

Deskripsi:

Fungsi ini melakukan tokenisasi (mengubah teks menjadi token angka) dan padding (menyesuaikan panjang token agar seragam). Panjang padding dapat ditentukan secara manual atau dihitung otomatis.

Parameter:

  • text: Input berupa string, pandas Series, atau list teks yang akan ditokenisasi dan dipad.
  • max_len (opsional): Panjang maksimum padding. Jika 0, panjang akan dihitung otomatis.

Output:

  • Mengembalikan numpy array berisi token yang telah dipad.

Contoh Penggunaan:

text = ["This is a test", "Another example"]
padded_sequences = tokenize_and_padding(text)
print(padded_sequences)

3. only_prediction(tokenized)

Deskripsi:

Fungsi ini melakukan prediksi sentimen berdasarkan token yang telah diproses menggunakan model. Hasilnya berupa probabilitas dan label sentimen (positif/negatif).

Parameter:

  • tokenized: Numpy array atau list token yang telah dipad.

Output:

  • DataFrame dengan kolom:
    • prediction: Probabilitas prediksi.
    • sentiment: Label sentimen (1 = positif, 0 = negatif).

Contoh Penggunaan:

tokenized = [[1, 2, 3, 4], [5, 6, 7, 0]]
result = only_prediction(tokenized)
print(result)

4. full_prediction(text, pad=0)

Deskripsi:

Fungsi ini melakukan proses lengkap mulai dari preprocessing, tokenisasi, padding, hingga prediksi sentimen untuk teks mentah.

Parameter:

  • text: Input berupa string atau pandas Series yang akan diproses.
  • pad (opsional): Panjang padding. Jika 0, panjang akan dihitung otomatis.

Output:

  • DataFrame dengan kolom:
    • text: Teks yang telah diproses.
    • padded: Token hasil padding.
    • prediction: Probabilitas prediksi.
    • sentiment: Label sentimen (1 = positif, 0 = negatif).

Contoh Penggunaan:

text = "This is a great day!"
result = full_prediction(text)
print(result)

5. detokenized(sequences)

Deskripsi:

Fungsi ini mengubah token angka hasil tokenisasi kembali menjadi teks asli berdasarkan mapping tokenizer.index_word.

Parameter:

  • sequences: List dua dimensi berisi token angka.

Output:

  • List teks hasil detokenisasi.

Contoh Penggunaan:

sequences = [[1, 2, 3, 4], [5, 6, 0, 0]]
detokenized_text = detokenized(sequences)
print(detokenized_text)


Selamat menganalisis! Semoga bermanfaat! 😄

Dependencies Package ini membutuhkan library berikut:

  • Python 3.7+
  • TensorFlow
  • Numpy
  • Pandas
  • Scikit-learn
  • Joblib

Lisensi Project ini dirilis di bawah lisensi MIT.

Kontak Jika memiliki pertanyaan atau feedback, silakan hubungi saya: Komang Nitay Prasaddas Email: nitay06@students.amikom.ac.id

Metadata

Release files for sentiment-bitcoin 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentiment-bitcoin 0.0.1
File Size Uploaded Provenance
sentiment_bitcoin-0.0.1.tar.gz 96.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sentiment-bitcoin 0.0.1
File Interpreter ABI Platform
sentiment_bitcoin-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 192.2 MB

Release files / sentiment_bitcoin-0.0.1.tar.gz

Download URL sentiment_bitcoin-0.0.1.tar.gz
Size 96.1 MB
Tags Source
SHA-256 checksum
How to use checksums
1957e52566b0156c5522d65496357888d3ff4a11614739db5dbc941e72bd966e
BLAKE2b-256 checksum
How to use checksums
64cd75ef10b5a0d8318d347d2dba252ff359abd116d4cbe6c49f094dd76ab7ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / sentiment_bitcoin-0.0.1-py3-none-any.whl

Download URL sentiment_bitcoin-0.0.1-py3-none-any.whl
Size 96.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ec25f2f7cc60ee078226d86d76e649530b50fe08e87303c41715b62b67a95e00
BLAKE2b-256 checksum
How to use checksums
cdb05057321b14f120e0e0a4fbbd2f41a39035ee40df69d48b46799b6ae88015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Security for sentiment-bitcoin 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page