<jupyter_start><jupyter_text>**Sentiment Analysis w/ Malaya Python Library**Using the Malaya Library, this model is able to analyze any given text and determine it's sentiment rating. The model will give the negative / neutral / positive scores for the text given.------------------------------<jupyter_code># We will install the malaya library package from https://github.com/huseinzol05/malaya
!pip3 install malaya

# Import the Malaya package, Tensorflow and PrettyPrint from Python
import malaya
import tensorflow as tf
from pprint import pprint

# Check the loaded Tensorflow version
tf.__version__
xlnet = malaya.sentiment.transformer('xlnet')
tiny_albert = malaya.sentiment.transformer('tiny-albert')
xlnet.predict_proba(['bodoh punya orang'])
tiny_albert.predict_proba(['danish busuk'])
tiny_albert.predict_proba(['tengok la kau jalan kat mana'])
xlnet.predict_proba(['aku nak tolong kau ni'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11385606874328678, 'fraction_numerical': 0.00322234156820623, 'mean_word_length': 5.172185430463577, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '392695', 'license': 'Apache-2.0', 'n_tokens_mistral': 277, 'n_tokens_neox': 271, 'n_words': 93, 'path': 'Sentiment Analysis w_ Malaya Python Library.ipynb', 'repo_name': 'MagusWyvern/machine-learning-notebooks', 'size': '931'}