Skip to content

Commit c2a1be3

Browse files
committed
fix code 1.2 to 1.3
1 parent b348dbc commit c2a1be3

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Homepages :[https://sites.google.com/view/pythainlp/home](https://sites.google.c
1111

1212
Natural language processing หรือ การประมวลภาษาธรรมชาติ โมดูล PyThaiNLP เป็นโมดูลที่ถูกพัฒนาขึ้นเพื่องานวิจัยและพัฒนาการประมวลภาษาธรรมชาติภาษาไทยในภาษา Python
1313

14-
รองรับ Python 2.7 และ Python 3.4 ขึ้นไป
14+
รองรับ Python 3.4 ขึ้นไป
1515

1616
- เอกสารการใช้งาน : [https://sites.google.com/view/pythainlp/home](https://sites.google.com/view/pythainlp/home)
1717
- หน้าหลัก GitHub : [https://github.com/wannaphongcom/pythainlp](https://github.com/wannaphongcom/pythainlp)
@@ -35,7 +35,7 @@ Natural language processing หรือ การประมวลภาษา
3535

3636
# ติดตั้ง
3737

38-
รองรับ Python 2.7 และ Python 3.4 ขึ้นไป
38+
รองรับ Python 3.4 ขึ้นไป
3939

4040
รุ่นเสถียร
4141

@@ -57,6 +57,8 @@ $ CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip i
5757

5858
# เอกสารการใช้งานเบื้องต้น
5959

60+
อ่านได้ที่ https://github.com/wannaphongcom/pythainlp/blob/master/docs/pythainlp-1-3-thai.md
61+
6062
### License
6163

6264
Apache Software License 2.0

README.rst

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1+
=========
12
PyThaiNLP
23
=========
34

4-
Thai NLP in python package.
5-
6-
- Homepage : https://sites.google.com/view/pythainlp/home
7-
- GitHub : https://github.com/wannaphongcom/pythainlp
5+
เวชั่น 1.3
86

7+
โมดูลประมวลผลภาษาธรรมชาติภาษาไยใน Python
98

10-
Version
11-
~~~~~~~
12-
13-
1.2
9+
รองรับ Python 3.4 ขึ้นไปเท่านั้น
1410

11+
**ติดตั้ง**
1512

16-
Install
17-
=======
13+
pip install pythainlp
1814

19-
.. code:: sh
15+
เอกสาร `https://github.com/wannaphongcom/pythainlp <https://github.com/wannaphongcom/pythainlp>`_
2016

21-
$ pip install pythainlp
2217

2318
License
2419
~~~~~~~

docs/pythainlp-1-3-thai.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,15 @@ from pythainlp.change import *
165165
- texttothai(str) แปลงแป้นตัวอักษรภาษาอังกฤษเป็นภาษาไทย
166166
- texttoeng(str) แปลงแป้นตัวอักษรภาษาไทยเป็นภาษาอังกฤษ
167167

168-
คืนค่าออกมาเป็น str
168+
คืนค่าออกมาเป็น str
169+
170+
### Sentiment analysis ภาษาไทย
171+
172+
ใช้ข้อมูลจาก https://github.com/wannaphongcom/lexicon-thai/tree/master/ข้อความ/
173+
174+
```python
175+
from pythainlp.sentiment import sentiment
176+
sentiment(str)
177+
```
178+
179+
รับค่า str ส่งออกเป็น pos , neg หรือ neutral

pythainlp/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
from pythainlp.sentiment import *
99
from pythainlp.spell import *
1010
from pythainlp.romanization import *
11-
from pythainlp.segment import * # เตรียมลบออก 1
12-
from pythainlp.tokenize import * # แทนที่ 1
11+
from pythainlp.segment import *
12+
from pythainlp.tokenize import *
1313
from pythainlp.rank import *
1414
from pythainlp.change import *
1515
from pythainlp.number import *
1616
from pythainlp.date import *
17-
from pythainlp.postaggers import * # เตรียมลบออก 2
18-
from pythainlp.tag import * # แทนที่ 2
17+
from pythainlp.postaggers import *
18+
from pythainlp.tag import *
1919
from pythainlp.collation import *
2020
from pythainlp.test import *
21-
from pythainlp.Text import *
21+
from pythainlp.Text import *

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
setup(
2020
name='pythainlp',
21-
version='1.2',
21+
version='1.3',
2222
description="Thai NLP in python package.",
2323
author='Wannaphong Phatthiyaphaibun',
2424
author_email='[email protected]',
2525
url='https://github.com/wannaphongcom/pythainlp',
2626
packages=find_packages(),
2727
test_suite='pythainlp.test',
28-
package_data={'pythainlp.corpus':['thaipos.json','thaiword.txt','LICENSE_THA_WN','tha-wn.db'],'pythainlp.sentiment':['vocabulary.data','sentiment.data']},
28+
package_data={'pythainlp.corpus':['thaipos.json','thaiword.txt','LICENSE_THA_WN','tha-wn.db','new-thaidict.txt','negation.txt'],'pythainlp.sentiment':['vocabulary.data','sentiment.data']},
2929
include_package_data=True,
3030
install_requires=requirements,
3131
license='Apache Software License 2.0',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py26, py27, py33, py34, py35, flake8
2+
envlist = py34, py35, flake8
33

44
[testenv:flake8]
55
basepython=python

0 commit comments

Comments
 (0)