diff --git a/.travis.yml b/.travis.yml index b74706613..653cf3d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,18 +2,15 @@ # This file will be regenerated if you run travis_pypi_setup.py language: python -python: 3.5 - -env: - - TOXENV=py36 - - TOXENV=py35 - - TOXENV=py34 - - TOXENV=py33 - - TOXENV=py27 - - TOXENV=pypy +python: + - "3.4" + - "3.5" + - "3.6" # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: pip install -U tox +os: + - linux # command to run tests, e.g. python setup.py test script: python setup.py test diff --git a/README.md b/README.md index 624678906..7bfe301e7 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,93 @@ [![pypi](https://img.shields.io/pypi/v/pythainlp.svg)](https://pypi.python.org/pypi/pythainlp) [![Build Status](https://travis-ci.org/wannaphongcom/pythainlp.svg?branch=develop)](https://travis-ci.org/wannaphongcom/pythainlp) +Homepages :[https://sites.google.com/view/pythainlp/home](https://sites.google.com/view/pythainlp/home) + +# English + +Thai NLP in python package. + +Thai Natural language processing in Python language. + +Supports Python 3.4 + + + - Document : [https://pythonhosted.org/pythainlp/](https://pythonhosted.org/pythainlp/) + - GitHub Home : [https://github.com/wannaphongcom/pythainlp](https://github.com/wannaphongcom/pythainlp) + +### Project status + +Developing + +### Version +1.1 + +### Capabilities + - Thai Segment + - Thai to Latin + - Thai Postaggers + - Read a number to text in Thai language + - Sort the words of a sentence + - Fix the printer forgot to change the language + - Check the wrong words in Thai languag + - And more. + +# Install + +Supports Python 3.4 + + +Stable version + +```sh +$ pip install pythainlp +``` + + +# Document + +Sample usage + +```python +# Thai Segment +from pythainlp.segment import segment +a = 'ฉันรักภาษาไทยเพราะฉันเป็นคนไทย' +b = segment(a) +print(b) # ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย'] +# Thai Postaggers +from pythainlp.postaggers import tag +print(tag('คุณกำลังประชุม')) # [('คุณ', 'PPRS'), ('กำลัง', 'XVBM'), ('ประชุม', 'VACT')] +# Find the number word of the most +from pythainlp.rank import rank +aa = rank(b) +print(aa) # Counter({'ฉัน': 2, 'ไทย': 2, 'เป็น': 1, 'รัก': 1, 'ภาษา': 1, 'เพราะ': 1, 'คน': 1}) +# Thai to Latin +from pythainlp.romanization import romanization +b=romanization("แมว") +print(b) # mæw +# Fix the printer forgot to change the language +from pythainlp.change import * +a="l;ylfu8iy[" +a=texttothai(a) +b="นามรสนอำันี" +b=texttoeng(b) +print(a) # สวัสดีครับ +print(b) # ok,iloveyou +# Read a number to text in Thai language +from pythainlp.number import numtowords +print("5611116.50") +print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์ +``` + +### License + +Apache Software License 2.0 + +# Thai + Thai NLP in python package. Natural language processing หรือ การประมวลภาษาธรรมชาติ โมดูล PyThaiNLP เป็นโมดูลที่ถูกพัฒนาขึ้นเพื่องานวิจัยและพัฒนาการประมวลภาษาธรรมชาติภาษาไทยในภาษา Python -รองรับทั้ง Python 2.7 และ Python 3 +รองรับ Python 3.4 ขึ้นไป - เอกสารการใช้งาน : [https://pythonhosted.org/pythainlp/](https://pythonhosted.org/pythainlp/) - หน้าหลัก GitHub : [https://github.com/wannaphongcom/pythainlp](https://github.com/wannaphongcom/pythainlp) @@ -17,7 +99,7 @@ Natural language processing หรือ การประมวลภาษา กำลังพัฒนา ### Version -1.0.0 +1.1 ### ความสามารถ - ตัดคำภาษาไทย @@ -31,18 +113,13 @@ Natural language processing หรือ การประมวลภาษา # ติดตั้ง -รองรับทั้ง Python 2.7 และ Python 3 +รองรับ Python 3.4 ขึ้นไป รุ่นเสถียร + ```sh $ pip install pythainlp ``` -รุ่นกำลังพัฒนา -```sh -$ git clone https://github.com/wannaphongcom/pythainlp.git -$ cd pythainlp -$ python setup.py install -``` ## ติดตั้งบน Mac @@ -59,6 +136,7 @@ $ CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip i # เอกสารการใช้งานเบื้องต้น ตัวอย่างการใช้งาน + ```python # ตัดคำ from pythainlp.segment import segment @@ -94,8 +172,9 @@ print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่ Apache Software License 2.0 + พัฒนาโดย นาย วรรณพงษ์ ภัททิยไพบูลย์ ### สนับสนุน -คุณสามารถร่วมพัฒนาโครงการนี้ได้ โดยการ Fork และส่ง pull requests กลับมา +คุณสามารถร่วมพัฒนาโครงการนี้ได้ โดยการ Fork และส่ง pull requests กลับมา \ No newline at end of file diff --git a/README.rst b/README.rst index da6a48929..008eaff84 100644 --- a/README.rst +++ b/README.rst @@ -6,103 +6,30 @@ PyThaiNLP Thai NLP in python package. -Natural language processing หรือ การประมวลภาษาธรรมชาติ โมดูล PyThaiNLP -เป็นโมดูลที่ถูกพัฒนาขึ้นเพื่องานวิจัยและพัฒนาการประมวลภาษาธรรมชาติภาษาไทยในภาษา -Python +- Homepage : https://pythonhosted.org/pythainlp/ +- GitHub : https://github.com/wannaphongcom/pythainlp -รองรับทั้ง Python 2.7 และ Python 3 - -- เอกสารการใช้งาน : https://pythonhosted.org/pythainlp/ -- หน้าหลัก GitHub : https://github.com/wannaphongcom/pythainlp - -สถานะโครงการ -~~~~~~~~~~~~ - -กำลังพัฒนา Version ~~~~~~~ -1.0.0 - -ความสามารถ -~~~~~~~~~~ +1.1 -- ตัดคำภาษาไทย -- ถอดเสียงภาษาไทยเป็น Latin -- Postaggers ภาษาไทย -- อ่านตัวเลขเป็นข้อความภาษาไทย -- เรียงจำนวนคำของประโยค -- แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา -- เช็คคำผิดในภาษาไทย -- และอื่น ๆ -ติดตั้ง +Install ======= -รองรับทั้ง Python 2.7 และ Python 3 - -รุ่นเสถียร +Python 3.4 + only .. code:: sh $ pip3 install pythainlp -รุ่นกำลังพัฒนา - -.. code:: sh - - $ git clone https://github.com/wannaphongcom/pythainlp.git - $ cd pythainlp - $ python setup.py install - -เอกสารการใช้งานเบื้องต้น -======================== - -ตัวอย่างการใช้งาน - -.. code:: python - - # ตัดคำ - from pythainlp.segment import segment - a = 'ฉันรักภาษาไทยเพราะฉันเป็นคนไทย' - b = segment(a) - print(b) # ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย'] - # Postaggers ภาษาไทย - from pythainlp.postaggers import tag - print(tag('คุณกำลังประชุม')) # [('คุณ', 'PPRS'), ('กำลัง', 'XVBM'), ('ประชุม', 'VACT')] - # หาคำที่มีจำนวนการใช้งานมากที่สุด - from pythainlp.rank import rank - aa = rank(b) - print(aa) # Counter({'ฉัน': 2, 'ไทย': 2, 'เป็น': 1, 'รัก': 1, 'ภาษา': 1, 'เพราะ': 1, 'คน': 1}) - # ถอดเสียงภาษาไทยเป็น Latin - from pythainlp.romanization import romanization - b=romanization("แมว") - print(b) # mæw - # แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา - from pythainlp.change import * - a="l;ylfu8iy[" - a=texttothai(a) - b="นามรสนอำันี" - b=texttoeng(b) - print(a) # สวัสดีครับ - print(b) # ok,iloveyou - # เปลี่ยนตัวเลขเป็นตัวอักษรภาษาไทย (เงินบาท) - from pythainlp.number import numtowords - print("5611116.50") - print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์ - License ~~~~~~~ Apache Software License 2.0 -พัฒนาโดย นาย วรรณพงษ์ ภัททิยไพบูลย์ - -สนับสนุน -~~~~~~~~ - -คุณสามารถร่วมพัฒนาโครงการนี้ได้ โดยการ Fork และส่ง pull requests กลับมา .. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/pythainlp.png .. |pypi| image:: https://img.shields.io/pypi/v/pythainlp.svg diff --git a/build-readme.bat b/build-readme.bat deleted file mode 100644 index f9f93606d..000000000 --- a/build-readme.bat +++ /dev/null @@ -1 +0,0 @@ -pandoc -f markdown -t rst -o README.rst README.md \ No newline at end of file diff --git a/build_docs.bat b/build_docs.bat deleted file mode 100644 index 81a111e9e..000000000 --- a/build_docs.bat +++ /dev/null @@ -1 +0,0 @@ -mkdocs build --clean \ No newline at end of file diff --git a/build_pypi.bat b/build_pypi.bat new file mode 100644 index 000000000..3acf08edc --- /dev/null +++ b/build_pypi.bat @@ -0,0 +1,2 @@ +python setup.py sdist +python setup.py bdist_wheel \ No newline at end of file diff --git a/pythainlp/__init__.py b/pythainlp/__init__.py index 285aded79..6889d5de9 100644 --- a/pythainlp/__init__.py +++ b/pythainlp/__init__.py @@ -1,19 +1,17 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from future import standard_library -standard_library.install_aliases() +# -*- coding: utf-8 -*- +from __future__ import absolute_import,unicode_literals __author__ = 'Wannaphong Phatthiyaphaibun' __email__ = 'wannaphong@yahoo.com' -__version__ = '1.0.0' +__version__ = '1.1' from pythainlp.romanization import * -from pythainlp.segment import * +from pythainlp.segment import * # เตรียมลบออก 1 +from pythainlp.tokenize import * # แทนที่ 1 from pythainlp.rank import * from pythainlp.change import * from pythainlp.number import * from pythainlp.date import * -from pythainlp.postaggers import * +from pythainlp.postaggers import * # เตรียมลบออก 2 +from pythainlp.tag import * # แทนที่ 2 from pythainlp.collation import * -from pythainlp.spell import * \ No newline at end of file +from pythainlp.spell import * +from pythainlp.test import * \ No newline at end of file diff --git a/pythainlp/change/__init__.py b/pythainlp/change/__init__.py index 910959ddf..08134b662 100644 --- a/pythainlp/change/__init__.py +++ b/pythainlp/change/__init__.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() -from nine import str,iteritems +from __future__ import absolute_import dictdata={'Z':'(','z':'ผ','X':')','x':'ป','C':'ฉ','c':'แ','V':'ฮ','v':'อ','B':'ฺ','b':'ิ','N':'์','n':'ื','M':'?','m':'ท','<':'ฒ',',':'ม','>':'ฬ','.':'ใ','?':'ฦ','/':'ฝ', 'A':'ฤ','a':'ฟ','S':'ฆ','s':'ห','D':'ฏ','d':'ก','F':'โ','f':'ด','G':'ฌ','g':'เ','H':'็','h':'้','J':'๋','j':'j','K':'ษ','k':'า','L':'ศ','l':'ส',':':'ซ','"':'.',"'":"ง",':':'ซ',';':'ว', 'Q':'๐','q':'ๆ','W':'"','w':'ไ','E':'ฎ','e':'ำ','R':'ฑ','r':'พ','T':'ธ','t':'ะ','Y':'ํ','y':'ั','U':'๊','u':'ี','I':'ณ','i':'ร','O':'ฯ','o':'น','P':'ญ','p':'ย','{':'ฐ','[':'บ','}':',',']':'ล','|':'ฅ',']':'ฃ', diff --git a/pythainlp/chunk/__init__.py b/pythainlp/chunk/__init__.py new file mode 100644 index 000000000..f453d1295 --- /dev/null +++ b/pythainlp/chunk/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import +# TODO \ No newline at end of file diff --git a/pythainlp/collation/__init__.py b/pythainlp/collation/__init__.py index 38329a93c..a2c63b7ad 100644 --- a/pythainlp/collation/__init__.py +++ b/pythainlp/collation/__init__.py @@ -1,9 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() +from __future__ import absolute_import import icu collator1 = icu.Collator.createInstance(icu.Locale('th_TH')) # เรียงลำดับข้อมูล list ภาษาไทย diff --git a/pythainlp/corpus/LICENSE_THA_WN b/pythainlp/corpus/LICENSE_THA_WN new file mode 100644 index 000000000..e9774060e --- /dev/null +++ b/pythainlp/corpus/LICENSE_THA_WN @@ -0,0 +1,35 @@ +Copyright: 2011 NICT + +Thai WordNet + +This software and database is being provided to you, the LICENSEE, by +the National Institute of Information and Communications Technology +under the following license. By obtaining, using and/or copying this +software and database, you agree that you have read, understood, and +will comply with these terms and conditions: + + Permission to use, copy, modify and distribute this software and + database and its documentation for any purpose and without fee or + royalty is hereby granted, provided that you agree to comply with + the following copyright notice and statements, including the + disclaimer, and that the same appear on ALL copies of the software, + database and documentation, including modifications that you make + for internal use or for distribution. + +Thai WordNet Copyright 2011 by the National Institute of +Information and Communications Technology (NICT). All rights +reserved. + +THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND NICT MAKES NO +REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, +BUT NOT LIMITATION, NICT MAKES NO REPRESENTATIONS OR WARRANTIES OF +MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE +OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE +ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +The name of the National Institute of Information and Communications +Technology may not be used in advertising or publicity pertaining to +distribution of the software and/or database. Title to copyright in +this software, database and any associated documentation shall at all +times remain with National Institute of Information and Communications +Technology and LICENSEE agrees to preserve same. diff --git a/pythainlp/corpus/__init__.py b/pythainlp/corpus/__init__.py index cb88f0104..8ad022376 100644 --- a/pythainlp/corpus/__init__.py +++ b/pythainlp/corpus/__init__.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() -__all__ = ["thaipos", "thaiword"] +from __future__ import absolute_import +__all__ = ["thaipos", "thaiword","alphabet","tone","country","wordnet"] from .thaipos import get_data -from .thaiword import get_data \ No newline at end of file +from .thaiword import get_data +from .alphabet import get_data +from .tone import get_data +from .country import get_data \ No newline at end of file diff --git a/pythainlp/corpus/alphabet.py b/pythainlp/corpus/alphabet.py new file mode 100644 index 000000000..01781d84b --- /dev/null +++ b/pythainlp/corpus/alphabet.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import,unicode_literals +def get_data(): + """เป็นคำสั่งสำหรับดึงตัวอักษร ก - ฮ ในภาษาไทย + คืนค่า list + """ + return ["ก","ข","ฃ","ค","ฅ","ฆ","ง","จ","ฉ","ช","ซ","ฌ","ญ","ฎ","ฏ","ฐ","ฑ","ฒ","ณ","ด","ต","ถ","ท","ธ","น","บ","ป","ผ","ฝ","พ","ฟ","ภ","ม","ย","ร","ล","ว","ศ","ษ","ส","ห","ฬ","อ","ฮ"] \ No newline at end of file diff --git a/pythainlp/corpus/country.py b/pythainlp/corpus/country.py new file mode 100644 index 000000000..1a00c9e84 --- /dev/null +++ b/pythainlp/corpus/country.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import,unicode_literals +def get_data(): + """เป็นคำสั่งดึงชื่อประเทศในโลก รูปแบบภาษาไทย + คืนค่า list + """ + return ['อัฟกานิสถาน', 'แอลเบเนีย', 'แอลจีเรีย', 'อเมริกันซามัว', 'อันดอร์รา', 'แองโกลา', 'แองกวิลลา', 'ออสเตรเลียนแอนตาร์กติกเทร์ริทอรี', 'แอนติกาและบาร์บูดา', 'อาร์เจนตินา', 'อาร์มีเนีย', 'อารูบา', 'ออสเตรเลีย', 'ออสเตรีย', 'อาเซอร์ไบจาน','บาฮามาส', 'บาห์เรน', 'บังกลาเทศ', 'บาร์เบโดส', 'เบลารุส', 'เบลเยียม', 'เบลีซ', 'เบนิน', 'เบอร์มิวดา', 'ภูฏาน', 'โบลิเวีย', 'บอสเนียและเฮอร์เซโกวีนา', 'บอตสวานาa', 'เกาะบูเวต (Bouvetøya)', 'บราซิล', 'บริติชอินเดียนโอเชียนเทร์ริทอรี', 'หมู่เกาะบริติชเวอร์จิน', 'บรูไนดารุสซาลาม', 'บัลแกเรีย', 'บูร์กินาฟาโซ', 'บุรุนดี', 'กัมพูชา', 'แคเมอรูน', 'แคนาดา', 'กาบูเวร์ดี', 'หมู่เกาะเคย์แมน', 'สาธารณรัฐแอฟริกากลาง', 'ชาด', 'ชิลี', 'จีน', 'เกาะคริสต์มาส', 'หมู่เกาะโคโคส (คีลิง)', 'โคลอมเบีย', 'คอโมโรส', 'สาธารณรัฐคองโก', 'หมู่เกาะคุก', 'คอสตาริกา', 'โกตดิวัวร์ (ไอวอรีโคสต์)', 'โครเอเชีย', 'คิวบา', 'ไซปรัส', 'สาธารณรัฐเช็ก','เดนมาร์ก', 'จิบูตี', 'ดอมินีกา', 'สาธารณรัฐโดมินิกัน','เอกวาดอร์', 'อียิปต์', 'เอลซัลวาดอร์', 'อิเควทอเรียลกินี', 'เอริเทรีย', 'เอสโตเนีย', 'เอธิโอเปีย','หมู่เกาะแฟโร', 'หมู่เกาะฟอล์กแลนด์', 'ฟิจิ', 'ฟินแลนด์', 'ฝรั่งเศส', 'เฟรนช์เกียนา', 'เฟรนช์โปลินีเซีย', 'เฟรนช์เซาเทิร์นและแอนตาร์กติกแลนส์','กาบอง', 'แกมเบีย', 'จอร์เจีย', 'เยอรมนี', 'กานา', 'ยิบรอลตาร์', 'กรีซ', 'กรีนแลนด์', 'เกรเนดา', 'กัวเดอลุป', 'กวม', 'กัวเตมาลา', 'เกิร์นซีย์', 'กินี', 'กินี-บิสเซา', 'กายอานา','เฮติ', 'เกาะเฮิร์ดและหมู่เกาะแมกดอนัลด์', 'นครรัฐวาติกัน', 'ฮอนดูรัส', 'ฮ่องกง', 'ฮังการี','ไอซ์แลนด์', 'อินเดีย', 'อินโดนีเซีย', 'อิหร่าน', 'อิรัก', 'ไอร์แลนด์', 'เกาะแมน', 'อิสราเอล', 'อิตาลี','จาเมกา', 'ญี่ปุ่น', 'เจอร์ซีย์', 'จอร์แดน','คาซัคสถาน', 'เคนยา', 'คิริบาส', 'เกาหลีใต้', 'เกาหลีเหนือ', 'คูเวต', 'คีร์กีซสถาน','ลาว', 'ลัตเวีย', 'เลบานอน', 'เลโซโท', 'ไลบีเรีย', 'ลิเบีย', 'ลิกเตนสไตน์', 'ลิทัวเนีย', 'ลักเซมเบิร์ก','มาเก๊า', 'สาธารณรัฐมาซิโดเนีย', 'มาดากัสการ์', 'มาลาวี', 'มาเลเซีย', 'มัลดีฟส์', 'มาลี', 'มอลตา', 'หมู่เกาะมาร์แชลล์', 'มาร์ตีนิก', 'มอริเตเนีย', 'มอริเชียส', 'มายอต', 'เม็กซิโก', 'ไมโครนีเซีย', 'มอลโดวา', 'โมนาโก', 'มองโกเลีย', 'มอนเตเนโกร', 'มอนต์เซอร์รัต', 'โมร็อกโก', 'โมซัมบิก', 'พม่า', 'นามิเบีย', 'นาอูรู', 'เนปาล', 'เนเธอร์แลนด์แอนทิลลีส', 'เนเธอร์แลนด์', 'นิวแคลิโดเนีย', 'นิวซีแลนด์', 'นิการากัว', 'ไนเจอร์', 'ไนจีเรีย', 'นีอูเอ', 'เกาะนอร์ฟอล์ก', 'หมู่เกาะนอร์เทิร์นมาเรียนา', 'นอร์เวย์', 'โอมาน', 'ปากีสถาน', 'ปาเลา', 'รัฐปาเลสไตน์', 'ปานามา', 'ปาปัวนิวกินี', 'ปารากวัย', 'เปรู', 'ฟิลิปปินส์', 'หมู่เกาะพิตแคร์น', 'โปแลนด์', 'โปรตุเกส', 'เปอร์โตริโก','กาตาร์','เรอูว์นียง', 'โรมาเนีย', 'รัสเซีย', 'รวันดา','แซ็ง-บาร์เตเลมี', 'เซนต์เฮเลนา', 'เซนต์คิตส์และเนวิส', 'เซนต์ลูเซีย', 'แซ็ง-มาร์แต็ง', 'แซงปีแยร์และมีเกอลง', 'เซนต์วินเซนต์และเกรนาดีนส์', 'ซามัว', 'ซานมารีโน', 'เซาตูเมและปรินซิปี', 'ซาอุดีอาระเบีย', 'เซเนกัล', 'เซอร์เบีย', 'เซเชลส์', 'เซียร์ราลีโอน', 'สิงคโปร์', 'สโลวาเกีย', 'สโลวีเนีย', 'หมู่เกาะโซโลมอน', 'โซมาเลีย', 'แอฟริกาใต้', 'เกาะเซาท์จอร์เจียและหมู่เกาะเซาท์แซนด์วิช', 'สเปน', 'ศรีลังกา', 'ซูดาน', 'ซูรินาม', 'สฟาลบาร์', 'ยานไมเอน', 'สวาซิแลนด์', 'สวีเดน', 'สวิตเซอร์แลนด์', 'ซีเรีย','ไต้หวัน', 'ทาจิกิสถาน', 'แทนซาเนีย', 'ไทย', 'ติมอร์-เลสเต', 'โตโก', 'โตเกเลา', 'ตองกา', 'ตรินิแดดและโตเบโก', 'ตูนิเซีย', 'ตุรกี', 'เติร์กเมนิสถาน', 'หมู่เกาะเติกส์และหมู่เกาะเคคอส', 'ตูวาลู','ยูกันดา', 'ยูเครน', 'สหรัฐอาหรับเอมิเรตส์', 'สหราชอาณาจักร', 'สหรัฐอเมริกา', 'เกาะเล็กรอบนอกของสหรัฐอเมริกา', 'หมู่เกาะเวอร์จินของสหรัฐอเมริกา', 'อุรุกวัย', 'อุซเบกิสถาน','วานูอาตู', 'เวเนซุเอลา', 'เวียดนาม','วาลลิสและฟุตูนา', 'เวสเทิร์นสะฮารา','เยเมน', 'แซมเบีย', 'ซิมบับเว'] \ No newline at end of file diff --git a/pythainlp/corpus/tha-wn.db b/pythainlp/corpus/tha-wn.db new file mode 100644 index 000000000..8ef8afb5e Binary files /dev/null and b/pythainlp/corpus/tha-wn.db differ diff --git a/pythainlp/corpus/thaipos.py b/pythainlp/corpus/thaipos.py index e9fc8b555..2614fae36 100644 --- a/pythainlp/corpus/thaipos.py +++ b/pythainlp/corpus/thaipos.py @@ -1,15 +1,9 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division from builtins import open -from future import standard_library -standard_library.install_aliases() import pythainlp import os -from nine import nimport,str -json= nimport('json') +import json templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), 'corpus') template_file = os.path.join(templates_dir, 'thaipos.json') def get_data(): diff --git a/pythainlp/corpus/thaiword.py b/pythainlp/corpus/thaiword.py index 4f78c382c..a29ea7521 100644 --- a/pythainlp/corpus/thaiword.py +++ b/pythainlp/corpus/thaiword.py @@ -1,13 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from future import standard_library -standard_library.install_aliases() import os -from nine import nimport,str -codecs= nimport('codecs') import codecs import pythainlp templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), 'corpus') diff --git a/pythainlp/corpus/tone.py b/pythainlp/corpus/tone.py new file mode 100644 index 000000000..8ec48dbc2 --- /dev/null +++ b/pythainlp/corpus/tone.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import,unicode_literals +def get_data(): + """เป็นคำสั่งสำหรับตัววรรณยุกต์ในภาษาไทย + คืนค่า list + """ + return ['่','้','๊','๋'] \ No newline at end of file diff --git a/pythainlp/corpus/wordnet.py b/pythainlp/corpus/wordnet.py new file mode 100644 index 000000000..29ca11ba4 --- /dev/null +++ b/pythainlp/corpus/wordnet.py @@ -0,0 +1,28 @@ +# WordNet ภาษาไทย +from __future__ import print_function +import sqlite3 +import pythainlp +import os +from collections import namedtuple +templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), 'corpus') +template_file = os.path.join(templates_dir, 'tha-wn.db') +conn = sqlite3.connect(template_file) +Word = namedtuple('Word', 'synsetid li') +Synset = namedtuple('Synset', 'synset li') +def getWords(wordid): + """เป็นคำสั่ง ใช้รับคำจาก ID รับค่า str ส่งออกเป็น tuple ('Word', 'synsetid li')""" + words = [] + cur = conn.execute("select * from word_synset where synsetid=?", (wordid,)) + row = cur.fetchone() + return Word(*cur.fetchone()) +def getSynset(synset): + """เป็นคำสั่ง ใช้รับ Synset รับค่า str ส่งออกเป็น tuple ('Synset', 'synset li')""" + cursor=conn.execute("select * from word_synset where li=?",(synset,)) + row=cursor.fetchone() + if row: + return Synset(*row) + else: + return None +if __name__ == "__main__": + print(getSynset("ผลักดันกลับ")) + print(getWords("02503365-v")) \ No newline at end of file diff --git "a/pythainlp/corpus/\340\270\204\340\270\263\340\270\241\340\270\271\340\270\245-\340\270\204\340\270\263\340\270\255\340\271\210\340\270\262\340\270\231.db" "b/pythainlp/corpus/\340\270\204\340\270\263\340\270\241\340\270\271\340\270\245-\340\270\204\340\270\263\340\270\255\340\271\210\340\270\262\340\270\231.db" new file mode 100644 index 000000000..13f77e4c3 Binary files /dev/null and "b/pythainlp/corpus/\340\270\204\340\270\263\340\270\241\340\270\271\340\270\245-\340\270\204\340\270\263\340\270\255\340\271\210\340\270\262\340\270\231.db" differ diff --git a/pythainlp/date/__init__.py b/pythainlp/date/__init__.py index 9dfcf6857..17e3c3f68 100644 --- a/pythainlp/date/__init__.py +++ b/pythainlp/date/__init__.py @@ -1,12 +1,16 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division +import icu +import datetime # TODO +def now(): + ''' + คืนค่าเวลา ณ ขณะนี้ ในรูปแบบ str + ตัวอย่าง "7 มกราคม 2560 20:22:59" + ''' + formatter = icu.DateFormat.createDateTimeInstance(icu.DateFormat.LONG, icu.DateFormat.kDefault, icu.Locale('th_TH')) + return formatter.format(datetime.datetime.now()) # BE คือ พ.ศ. # AD คือ ค.ศ. -# AH ปีฮิจเราะห์ศักราชเป็นปีพุทธศักราช จะต้องบวกด้วย 1122 -from future import standard_library -standard_library.install_aliases() \ No newline at end of file +# AH ปีฮิจเราะห์ศักราชเป็นปีพุทธศักราช จะต้องบวกด้วย 1122 \ No newline at end of file diff --git a/pythainlp/number/__init__.py b/pythainlp/number/__init__.py index d615a03cc..7fb07b616 100644 --- a/pythainlp/number/__init__.py +++ b/pythainlp/number/__init__.py @@ -1,12 +1,8 @@ # -*- coding: utf-8 -*- # ระบบแปลงเลขใน 1- 10 ภาษาไทย -from __future__ import absolute_import,division,print_function -from __future__ import unicode_literals +from __future__ import absolute_import,division,print_function,unicode_literals from builtins import dict from builtins import int -from future import standard_library -standard_library.install_aliases() -from nine import str import math p = [['ภาษาไทย', 'ตัวเลข','เลขไทย'], ['หนึ่ง', '1', '๑'], diff --git a/pythainlp/postaggers/__init__.py b/pythainlp/postaggers/__init__.py index e65a72e4d..4e78e1eb5 100644 --- a/pythainlp/postaggers/__init__.py +++ b/pythainlp/postaggers/__init__.py @@ -1,9 +1,4 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from future import standard_library -standard_library.install_aliases() __all__ = ["text"] from .text import tag \ No newline at end of file diff --git a/pythainlp/postaggers/text.py b/pythainlp/postaggers/text.py index 3fb589780..284dff0e5 100644 --- a/pythainlp/postaggers/text.py +++ b/pythainlp/postaggers/text.py @@ -1,13 +1,10 @@ -from __future__ import absolute_import,division,print_function -from __future__ import unicode_literals -from future import standard_library -standard_library.install_aliases() -from nine import nimport,str +# -*- coding: utf-8 -*- +from __future__ import absolute_import,division,print_function,unicode_literals from pythainlp.segment import segment import pythainlp import codecs import os -json= nimport('json') +import json import nltk.tag, nltk.data templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), 'corpus') template_file = os.path.join(templates_dir, 'thaipos.json') diff --git a/pythainlp/rank/__init__.py b/pythainlp/rank/__init__.py index 6426cdc7c..d43adc08e 100644 --- a/pythainlp/rank/__init__.py +++ b/pythainlp/rank/__init__.py @@ -1,11 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() +from __future__ import absolute_import,unicode_literals from collections import Counter -from pythainlp.segment import segment #เรียงจำนวนคำของประโยค def rank(data): """เรียงจำนวนคำของประโยค diff --git a/pythainlp/romanization/__init__.py b/pythainlp/romanization/__init__.py index a3334edba..59c7a4f6f 100644 --- a/pythainlp/romanization/__init__.py +++ b/pythainlp/romanization/__init__.py @@ -1,12 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() -import icu -# ถอดเสียงภาษาไทยเป็น Latin -def romanization(data): - """เป็นคำสั่ง ถอดเสียงภาษาไทยเป็น Latin รับค่า ''str'' ข้อความ คืนค่าเป็น ''str'' ข้อความ Latin""" - thai2latin = icu.Transliterator.createInstance('Thai-Latin') - return thai2latin.transliterate(data) \ No newline at end of file +from __future__ import absolute_import,unicode_literals +__all__ = ['pyicu'] +try: + from .pyicu import romanization +except: + print("error") \ No newline at end of file diff --git a/pythainlp/romanization/pyicu.py b/pythainlp/romanization/pyicu.py new file mode 100644 index 000000000..8b1d35ad6 --- /dev/null +++ b/pythainlp/romanization/pyicu.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +import icu +# ถอดเสียงภาษาไทยเป็น Latin +def romanization(data): + """เป็นคำสั่ง ถอดเสียงภาษาไทยเป็น Latin รับค่า ''str'' ข้อความ คืนค่าเป็น ''str'' ข้อความ Latin""" + thai2latin = icu.Transliterator.createInstance('Thai-Latin') + return thai2latin.transliterate(data) \ No newline at end of file diff --git a/pythainlp/romanization/royin.py b/pythainlp/romanization/royin.py new file mode 100644 index 000000000..7cd6270f5 --- /dev/null +++ b/pythainlp/romanization/royin.py @@ -0,0 +1,114 @@ +# ยังไม่สามารถถอดเสียงสระได้ *** +from __future__ import absolute_import +from pythainlp.segment import segment +import re + +th = u'[ก-ฮ]+' + +p = [['อักษรไทย', 'ต้น', 'ทั่วไป'], + ['ก', 'k', 'k'], + ['ข', 'kh', 'k'], + ['ฃ', 'kh', 'k'], + ['ค', 'kh', 'k'], + ['ฅ', 'kh', 'k'], + ['ฆ', 'kh', 'k'], + ['ง', 'ng', 'ng'], + ['จ', 'ch', 't'], + ['ฉ', 'ch', 't'], + ['ช', 'ch', 't'], + ['ซ', 's', 't'], + ['ฌ', 'ch', 't'], + ['ญ', 'y', 'n'], + ['ฎ', 'd', 't'], + ['ฏ', 't', 't'], + ['ฐ', 'th', 't'], + ['ฑ', 'th', 't'], + ['ฒ', 'th', 't'], + ['ณ', 'n', 'n'], + ['ด', 'd', 't'], + ['ต', 't', 't'], + ['ถ', 'th', 't'], + ['ท', 'th', 't'], + ['ธ', 'th', 't'], + ['น', 'n', 'n'], + ['บ', 'b', 'p'], + ['ป', 'p', 'p'], + ['ผ', 'ph', 'p'], + ['ฝ', 'f', 'p'], + ['พ', 'ph', 'p'], + ['ฟ', 'f', 'p'], + ['ภ', 'ph', 'p'], + ['ม', 'm', 'm'], + ['ย', 'y', ''], + ['ร', 'r', 'n'], + ['ล', 'l', 'n'], + ['ว', 'w', ''], + ['ศ', 's', 't'], + ['ษ', 's', 't'], + ['ส', 's', 't'], + ['ห', 'h', ''], + ['ฬ', 'l', 'n'], + ['อ', '', 'o'], + ['ฮ', 'h', '']] +p2 = dict((x[0], x[2]) for x in p[1:]) +p1 = dict((x[0], x[1]) for x in p[1:]) +d1 = 0 +# p1 อักรต้น +# p2 ทั่วไป +# def sub1(txt) + +tone = ['่','้','๊','๋'] +def delete1(data): + #โค้ดส่วนตัดวรรณยุกต์ออก + for a in tone: + if (re.search(a,data)): + data = re.sub(a,'',data) + return data +# ส่วนพยัญชนะ +def consonant(text): + try: + txt = delete1(text) + text = list(txt) + text1 = "" + text1 = p1[text[0]] + #print(len(text)) + #print(text) + if len(txt) == 2: # จัดการแก้ไขการสะกดคำที่มี 2 ตัว โดยการเติม o + text1 += 'o' + for a in txt[1:]: + #a=delete1(a) + if (re.search(th, a, re.U)): + text1 += p2[a] + else: + text1 += a + return text1 + except: + return text + +# ส่วนสระ +def vowel(data): + #พัฒนาอยู่ + #[ก-ฮ]ะ + a=list(data) + word=consonant(a[0]) + 'a' + return word + +def romanization(txt): + txt = segment(txt) # (','.join(str(x) for x in txt)) # แยกออกมาเป็น list + cc='' + #print(txt) + for b in txt: + cc+=consonant(b) + return cc + # return txt +if __name__ == "__main__": + print(romanization('ตอง') == "tong") + print(romanization('มอง')) + print(romanization('มด')) + print(romanization('พร')) + print(romanization('คน')) + print(romanization('พรม')) #! + #romanization('แมว') + print(vowel("ปะ") == "pa") + print(romanization('ชล')) + print(romanization('ต้น') == "ton") \ No newline at end of file diff --git a/pythainlp/segment/__init__.py b/pythainlp/segment/__init__.py index d48dd2fef..0fbb09c84 100644 --- a/pythainlp/segment/__init__.py +++ b/pythainlp/segment/__init__.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from future import standard_library -standard_library.install_aliases() __all__ = ['pyicu', 'dict','isthai','thai'] try: from .pyicu import segment diff --git a/pythainlp/segment/dict.py b/pythainlp/segment/dict.py index 7087f17d8..02bd13c0d 100644 --- a/pythainlp/segment/dict.py +++ b/pythainlp/segment/dict.py @@ -1,15 +1,10 @@ -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -import six -standard_library.install_aliases() +# -*- coding: utf-8 -*- +from __future__ import absolute_import,unicode_literals from .thai import data lines = data() # code by https://stackoverflow.com/a/16690988 def segment(string): - """Segments a string into words prefering longer words givens - a dictionary wset.""" + """รับค่าสตริง str คืนค่า list""" # Sort wset in decreasing string order lines.sort(key=len, reverse=True) result = tokenize(string, lines, "") diff --git a/pythainlp/segment/isthai.py b/pythainlp/segment/isthai.py index ba18002fc..fd9363375 100644 --- a/pythainlp/segment/isthai.py +++ b/pythainlp/segment/isthai.py @@ -1,9 +1,3 @@ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library -standard_library.install_aliases() def isThai(chr): cVal = ord(chr) if(cVal >= 3584 and cVal <= 3711): diff --git a/pythainlp/segment/pyicu.py b/pythainlp/segment/pyicu.py index b115664e6..65d624e4e 100644 --- a/pythainlp/segment/pyicu.py +++ b/pythainlp/segment/pyicu.py @@ -1,9 +1,4 @@ -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from builtins import next -from future import standard_library -standard_library.install_aliases() +from __future__ import absolute_import from .isthai import isThai import PyICU # ตัดคำภาษาไทย diff --git a/pythainlp/segment/thai.py b/pythainlp/segment/thai.py index 2e7b2db34..0234a9f71 100644 --- a/pythainlp/segment/thai.py +++ b/pythainlp/segment/thai.py @@ -1,10 +1,5 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() import os import codecs import pythainlp diff --git a/pythainlp/spell/__init__.py b/pythainlp/spell/__init__.py index aab1b5f7c..d7993f32c 100644 --- a/pythainlp/spell/__init__.py +++ b/pythainlp/spell/__init__.py @@ -1,9 +1,4 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from future import standard_library -standard_library.install_aliases() __all__ = ["hunspell"] from .hunspell import spell \ No newline at end of file diff --git a/pythainlp/spell/hunspell.py b/pythainlp/spell/hunspell.py index dee786a8a..e080cd76b 100644 --- a/pythainlp/spell/hunspell.py +++ b/pythainlp/spell/hunspell.py @@ -1,8 +1,4 @@ -from __future__ import absolute_import,print_function -from __future__ import unicode_literals -from __future__ import division -from future import standard_library -standard_library.install_aliases() +from __future__ import absolute_import,print_function,unicode_literals import subprocess import sys diff --git a/pythainlp/tag/__init__.py b/pythainlp/tag/__init__.py new file mode 100644 index 000000000..c8ce39eec --- /dev/null +++ b/pythainlp/tag/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# TODO ปรับ API ให้เหมือน nltk +from __future__ import absolute_import,division,print_function,unicode_literals +from pythainlp.postaggers import tag +def pos_tag(text): + return tag(text) \ No newline at end of file diff --git a/test.py b/pythainlp/test/__init__.py similarity index 61% rename from test.py rename to pythainlp/test/__init__.py index dbdf42735..bdcfaf9c8 100644 --- a/test.py +++ b/pythainlp/test/__init__.py @@ -1,22 +1,24 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division from __future__ import absolute_import -from future import standard_library -standard_library.install_aliases() import unittest -import optparse from collections import Counter +from pythainlp.corpus import alphabet +from pythainlp.corpus import wordnet from pythainlp.segment import segment +from pythainlp.segment.dict import segment as segmentdict from pythainlp.rank import rank from pythainlp.change import * from pythainlp.number import numtowords from pythainlp.postaggers import tag from pythainlp.romanization import romanization +from pythainlp.date import now +from collections import namedtuple +Synset = namedtuple('Synset', 'synset li') class TestUM(unittest.TestCase): def testSegment(self): self.assertEqual(segment('ฉันรักภาษาไทยเพราะฉันเป็นคนไทย'),['ฉัน', 'รัก', 'ภาษา', 'ไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คน', 'ไทย']) + def testSegmentDict(self): + self.assertEqual(segmentdict('ฉันรักภาษาไทยเพราะฉันเป็นคนไทย'),['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย']) def testRank(self): self.assertEqual(rank(["แมว","คน","แมว"]),Counter({'แมว': 2, 'คน': 1})) def testChange(self): @@ -27,5 +29,11 @@ def testNumber(self): self.assertEqual(numtowords(5611116.50),'ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์') def testTag(self): self.assertEqual(tag("คุณกำลังประชุม"),[('คุณ', 'PPRS'), ('กำลัง', 'XVBM'), ('ประชุม', 'VACT')]) + def testAlphabet(self): + self.assertEqual(str(type(alphabet.get_data())),"") + def testNow(self): + self.assertEqual(type(now()),type('7 มกราคม 2560 20:23:01')) + def testWordNet(self): + self.assertEqual(wordnet.getSynset("ผลักดันกลับ"),Synset(synset='02503365-v', li='ผลักดันกลับ')) if __name__ == '__main__': unittest.main() \ No newline at end of file diff --git a/pythainlp/tokenize/__init__.py b/pythainlp/tokenize/__init__.py new file mode 100644 index 000000000..18345ad49 --- /dev/null +++ b/pythainlp/tokenize/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# TODO ปรับ API ให้เหมือน nltk +from __future__ import absolute_import,division,print_function,unicode_literals +from pythainlp.segment import segment +def word_tokenize(text): + return segment(text) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..f3fcff7be --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pyicu>=1.9.3 +nltk>=3.2.2 +future>=0.16.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 23157e21c..e2e60debe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,4 +12,4 @@ search = __version__ = '{current_version}' replace = __version__ = '{new_version}' [wheel] -universal = 1 \ No newline at end of file +python-tag = py34 \ No newline at end of file diff --git a/setup.py b/setup.py index 39433f4fb..6613663b1 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,15 @@ -# -*- coding: utf-8 -*- - +#!/usr/bin/env python +# -*- coding: utf-8 -*- from setuptools import setup from setuptools import find_packages import codecs - with codecs.open('README.rst','r',encoding='utf-8') as readme_file: readme = readme_file.read() requirements = [ 'pyicu>=1.9.3', 'nltk>=3.2.2', - 'future>=0.16.0', - 'nine', - 'six', - # TODO: put package requirements here + 'future>=0.16.0' ] test_requirements = [ @@ -22,31 +18,27 @@ setup( name='pythainlp', - version='1.0.0', + version='1.1', description="Thai NLP in python package.", long_description=readme, author='Wannaphong Phatthiyaphaibun', author_email='wannaphong@yahoo.com', url='https://github.com/wannaphongcom/pythainlp', packages=find_packages(), - test_suite='test', - package_data={'pythainlp.corpus':['thaipos.json','thaiword.txt']}, + test_suite='pythainlp.test', + package_data={'pythainlp.corpus':['thaipos.json','thaiword.txt','LICENSE_THA_WN','tha-wn.db']}, include_package_data=True, install_requires=requirements, license='Apache Software License 2.0', zip_safe=False, - keywords='pythainlp', + keywords='pythainlp,nlp,thai', classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Natural Language :: Thai', - 'Topic :: Text Processing :: Linguistic', - 'Programming Language :: Python :: Implementation', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6'] -) + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Natural Language :: Thai', + 'Topic :: Text Processing :: Linguistic', + 'Programming Language :: Python :: Implementation', + 'Programming Language :: Python :: 3', + ], +) \ No newline at end of file diff --git a/upload_pypi.bat b/upload_pypi.bat new file mode 100644 index 000000000..40b91ef2d --- /dev/null +++ b/upload_pypi.bat @@ -0,0 +1 @@ +twine upload dist/* \ No newline at end of file