travis-ci
52 of 52 new or added lines in 3 files covered. (100.0%)
1068 of 1714 relevant lines covered (62.31%)
1.83 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
from __future__ import absolute_import,unicode_literals |
2 all except 631.1 ✔ |
3 |
import sys |
2 all except 631.1 ✔ |
4 |
try:
|
2 all except 631.1 ✔ |
5 |
from cutkum.tokenizer import Cutkum |
2 all except 631.1 ✔ |
6 |
except ImportError: |
2 all except 631.1 ✔ |
7 |
'''ในกรณีที่ยังไม่ติดตั้ง deepcut ในระบบ'''
|
|
8 |
import pip |
2 all except 631.1 ✔ |
9 |
pip.main(['install','cutkum']) |
2 all except 631.1 ✔ |
10 |
try:
|
2 all except 631.1 ✔ |
11 |
from cutkum.tokenizer import Cutkum |
2 all except 631.1 ✔ |
12 |
except ImportError: |
× |
13 |
sys.exit('Error ! using pip install cutkum')
|
× |
14 |
ck = Cutkum() |
2 all except 631.1 ✔ |
15 |
def segment(text): |
2 all except 631.1 ✔ |
16 |
return ck.tokenize(text)
|
2 all except 631.1 ✔ |