Skip to content

Commit

Permalink
new api like nltk
Browse files Browse the repository at this point in the history
ปรับ API ให้เหมือน NLTK
  • Loading branch information
wannaphong committed Feb 2, 2017
1 parent 1284521 commit ffe764e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pythainlp/__init__.py
Expand Up @@ -4,12 +4,14 @@
__email__ = 'wannaphong@yahoo.com'
__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 *
from pythainlp.test import *
3 changes: 3 additions & 0 deletions pythainlp/chunk/__init__.py
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# TODO
6 changes: 6 additions & 0 deletions 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)
6 changes: 6 additions & 0 deletions 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)

0 comments on commit ffe764e

Please sign in to comment.