Skip to content

Commit e9b8962

Browse files
committed
Fixed nercut
- Change import NER in nercut
1 parent abbd4e4 commit e9b8962

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pythainlp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "3.0.4"
2+
__version__ = "3.0.5"
33

44
thai_consonants = "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" # 44 chars
55

pythainlp/tokenize/nercut.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
nercut 0.1
3+
nercut 0.2
44
55
Dictionary-based maximal matching word segmentation, constrained with
66
Thai Character Cluster (TCC) boundaries, and combining tokens that are
@@ -10,9 +10,9 @@
1010
"""
1111
from typing import Iterable, List
1212

13-
from pythainlp.tag.named_entity import ThaiNameTagger
13+
from pythainlp.tag.named_entity import NER
1414

15-
_thainer = ThaiNameTagger()
15+
_thainer = NER(engine="thainer")
1616

1717

1818
def segment(
@@ -39,7 +39,7 @@ def segment(
3939
return []
4040

4141
global _thainer
42-
tagged_words = _thainer.get_ner(text, pos=False)
42+
tagged_words = _thainer.tag(text, pos=False)
4343

4444
words = []
4545
combining_word = ""

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.0.4
2+
current_version = 3.0.5
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
setup(
107107
name="pythainlp",
108-
version="3.0.4",
108+
version="3.0.5",
109109
description="Thai Natural Language Processing library",
110110
long_description=readme,
111111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)