Skip to content

Commit

Permalink
Fixed nercut
Browse files Browse the repository at this point in the history
- Change import NER in nercut
  • Loading branch information
wannaphong committed Feb 14, 2022
1 parent abbd4e4 commit e9b8962
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pythainlp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = "3.0.4"
__version__ = "3.0.5"

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

Expand Down
8 changes: 4 additions & 4 deletions pythainlp/tokenize/nercut.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
nercut 0.1
nercut 0.2
Dictionary-based maximal matching word segmentation, constrained with
Thai Character Cluster (TCC) boundaries, and combining tokens that are
Expand All @@ -10,9 +10,9 @@
"""
from typing import Iterable, List

from pythainlp.tag.named_entity import ThaiNameTagger
from pythainlp.tag.named_entity import NER

_thainer = ThaiNameTagger()
_thainer = NER(engine="thainer")


def segment(
Expand All @@ -39,7 +39,7 @@ def segment(
return []

global _thainer
tagged_words = _thainer.get_ner(text, pos=False)
tagged_words = _thainer.tag(text, pos=False)

words = []
combining_word = ""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.4
current_version = 3.0.5
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

setup(
name="pythainlp",
version="3.0.4",
version="3.0.5",
description="Thai Natural Language Processing library",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit e9b8962

Please sign in to comment.