Hai, yang di sana! Harap bintangi repo ini jika membantu Anda! Setiap bintang membantu Pyabsa melangkah lebih jauh, terima kasih banyak. Pyabsa adalah alat sumber terbuka dan terbuka untuk semua orang, tetapi jangan lupa untuk melampirkan informasi penulis (informal atau formal) dan alamat proyek dalam karya, produk dan publikasi Anda, dll.
Terlepas dari kertas, ada dua fitur baru di Pyabsa: Ekstraksi Triplet Sentimen Sentimen dan Ekstraksi Kali Lipat Aspek. Kami telah menggunakan demo di ruang pelukan, Anda dapat mencobanya secara online.
Kami telah menyiapkan banyak contoh untuk tugas yang berbeda. Silakan merujuk ke contoh untuk lebih banyak contoh penggunaan.
Untuk menggunakan pyabsa, instal versi terbaru dari PIP atau kode sumber:
pip install -U pyabsagit clone https://github.com/yangheng95/PyABSA --depth=1
cd PyABSA
python setup.py install from pyabsa import AspectTermExtraction as ATEPC , available_checkpoints
# you can view all available checkpoints by calling available_checkpoints()
checkpoint_map = available_checkpoints ()
aspect_extractor = ATEPC . AspectExtractor ( 'multilingual' ,
auto_device = True , # False means load model on CPU
cal_perplexity = True ,
)
# instance inference
aspect_extractor . predict ([ 'I love this movie, it is so great!' ],
save_result = True ,
print_result = True , # print the result
ignore_error = True , # ignore the error when the model cannot predict the input
)
inference_source = ATEPC . ATEPCDatasetList . Restaurant16
atepc_result = aspect_extractor . batch_predict ( target_file = inference_source , #
save_result = True ,
print_result = True , # print the result
pred_sentiment = True , # Predict the sentiment of extracted aspect terms
)
print ( atepc_result )
from pyabsa import AspectPolarityClassification as APC , available_checkpoints
# you can view all available checkpoints by calling available_checkpoints()
checkpoint_map = available_checkpoints ( show_ckpts = True )
classifier = APC . SentimentClassifier ( 'multilingual' ,
auto_device = True , # False means load model on CPU
cal_perplexity = True ,
)
# instance inference
classifier . predict ([ 'I love this movie, it is so great!' ],
save_result = True ,
print_result = True , # print the result
ignore_error = True , # ignore the error when the model cannot predict the input
)
inference_source = APC . APCDatasetList . Laptop14
apc_result = classifier . batch_predict ( target_file = inference_source , #
save_result = True ,
print_result = True , # print the result
pred_sentiment = True , # Predict the sentiment of extracted aspect terms
)
print ( apc_result )Silakan merujuk ke dokumentasi: Dokumentasi PYABSA. Jika Anda memiliki pertanyaan tentang dokumen, jangan ragu untuk mengangkat masalah. Juga, Anda dapat bergabung untuk meningkatkan dokumen.
Repositori ini didasarkan pada makalah kami untuk penelitian ABSA. Berikut adalah makalah yang dapat Anda kutip atau rujuk untuk implementasi Anda:
Jika Anda mencari proposal asli fokus konteks lokal, berikut adalah beberapa pengantar di sini.
@inproceedings { YangZL23 ,
author = { Heng Yang and
Chen Zhang and
Ke Li } ,
editor = { Ingo Frommholz and
Frank Hopfgartner and
Mark Lee and
Michael Oakes and
Mounia Lalmas and
Min Zhang and
Rodrygo L. T. Santos } ,
title = { PyABSA: {A} Modularized Framework for Reproducible Aspect-based Sentiment
Analysis } ,
booktitle = { Proceedings of the 32nd {ACM} International Conference on Information
and Knowledge Management, {CIKM} 2023, Birmingham, United Kingdom,
October 21-25, 2023 } ,
pages = { 5117--5122 } ,
publisher = { {ACM} } ,
year = { 2023 } ,
url = { https://doi.org/10.1145/3583780.3614752 } ,
doi = { 10.1145/3583780.3614752 } ,
timestamp = { Thu, 23 Nov 2023 13:25:05 +0100 } ,
biburl = { https://dblp.org/rec/conf/cikm/0008ZL23.bib } ,
bibsource = { dblp computer science bibliography, https://dblp.org }
}Repositori ini dikembangkan dan dikelola oleh Heng Yang (Yangheng95@github), dengan kontribusi besar dari peneliti masyarakat. Kami berharap Anda dapat membantu kami meningkatkan proyek ini, dan kontribusi Anda dipersilakan. Anda dapat memberikan kontribusi dalam banyak hal, termasuk:
PYABSA dirilis di bawah lisensi MIT, silakan kutip repo ini (atau makalah) atau lampirkan informasi penulis dalam pekerjaan Anda (repositori, blog, produk, dll.)