{"id":20457816,"url":"https://github.com/pythainlp/thai-sentiment-analysis","last_synced_at":"2026-03-15T19:17:50.573Z","repository":{"id":57456592,"uuid":"125164708","full_name":"PyThaiNLP/thai-sentiment-analysis","owner":"PyThaiNLP","description":"Thai sentiment analysis","archived":false,"fork":false,"pushed_at":"2019-09-27T16:36:03.000Z","size":30,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T23:18:11.943Z","etag":null,"topics":["sentiment-analysis","thai","thai-language","thai-nlp"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyThaiNLP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T06:17:14.000Z","updated_at":"2024-09-05T10:34:45.000Z","dependencies_parsed_at":"2022-09-07T11:00:29.403Z","dependency_job_id":null,"html_url":"https://github.com/PyThaiNLP/thai-sentiment-analysis","commit_stats":null,"previous_names":["pythainlp/thai_sentiment_analysis"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthai-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthai-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthai-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fthai-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyThaiNLP","download_url":"https://codeload.github.com/PyThaiNLP/thai-sentiment-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248667156,"owners_count":21142383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sentiment-analysis","thai","thai-language","thai-nlp"],"created_at":"2024-11-15T12:09:20.121Z","updated_at":"2026-03-15T19:17:50.526Z","avatar_url":"https://github.com/PyThaiNLP.png","language":"Python","readme":"# Python Thai Sentiment Analysis (PyThaiSA)\n\n[![Build Status](https://travis-ci.org/PyThaiNLP/thai-sentiment-analysis.svg?branch=master)](https://travis-ci.org/PyThaiNLP/thai-sentiment-analysis)\n[![Coverage Status](https://coveralls.io/repos/github/PyThaiNLP/thai-sentiment-analysis/badge.svg?branch=master)](https://coveralls.io/github/PyThaiNLP/thai-sentiment-analysis?branch=master)\n\n\nPython Thai sentiment analysis **(For Dev only)**\n\n## Install\n\n```\n$ pip install https://github.com/PyThaiNLP/thai_sentiment_analysis/archive/master.zip\n```\n\n## Use\n\nGoogle Colab : https://colab.research.google.com/drive/17y4tc69O6Z-dr1LbgR5FlPYZK46xCKbY\n\n```python\nfrom pythaisa import *\ndatatrain=[(\"ฉันรักคุณ\",\"love\"),(\"ผมก็รักคุณเหมือนกัน\",\"love\"),(\"เกลียดคุณ\",\"neg\"),(\"เกลียดเหมือนกัน\",\"neg\")]\nm=model(name=\"test\",train_dataset=datatrain)\nm.train()\nprint(m.predict(\"ฉันรักคุณ\"))\n```\n\n## Docs\n\n```python\nModel(name,model_type=\"naive_bayes\",train_dataset=None,test_dataset=None,\npath=None,features=basic_features)\n```\n\n- ```name``` is model name.\n- ```model_type``` is type of model. (Now,)\n- ```train_dataset``` is train dataset. ```[(text,tag),...]```\n- ```test_dataset``` is test dataset. ```[(text,tag),...]```\n- ```path``` is model path.\n- ```features``` is features function. (function input string and output is dict)\n\n### Trian\n\n```python\nModel().train()\n```\n\n### Predict\n\n```python\nModel().predict(text)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fthai-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythainlp%2Fthai-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fthai-sentiment-analysis/lists"}