Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Thai Natural Language Processing in Python.

PyThaiNLP is a Python package for text processing and linguistic analysis, similar to `nltk` but with focus on Thai language.

- This is [2.1.1 stable release](https://github.com/PyThaiNLP/pythainlp/releases). See [change log](https://github.com/PyThaiNLP/pythainlp/issues/181).
- This is [2.1.2 stable release](https://github.com/PyThaiNLP/pythainlp/releases). See [change log](https://github.com/PyThaiNLP/pythainlp/issues/181).
- For latest development, see [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) branch.
- 📫 follow our [PyThaiNLP](https://www.facebook.com/pythainlp/) Facebook page

Expand Down Expand Up @@ -119,7 +119,7 @@ PyThaiNLP เป็นไลบารีภาษาไพทอนเพื่

> เพราะโลกขับเคลื่อนต่อไปด้วยการแบ่งปัน

- รุ่นนี้คือรุ่นเสถียร [2.1.1](https://github.com/PyThaiNLP/pythainlp/releases) ดูความเปลี่ยนแปลงในรุ่นนี้ที่ [2.1 change log](https://github.com/PyThaiNLP/pythainlp/issues/181).
- รุ่นนี้คือรุ่นเสถียร [2.1.2(https://github.com/PyThaiNLP/pythainlp/releases) ดูความเปลี่ยนแปลงในรุ่นนี้ที่ [2.1 change log](https://github.com/PyThaiNLP/pythainlp/issues/181).
- สำหรับรุ่นที่กำลังพัฒนา ดูใน [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) branch
- PyThaiNLP 2.1 รองรับ Python 3.6 ขึ้นไป ผู้ใช้ Python 2.7+ ยังสามารถใช้ PyThaiNLP 1.6 ได้
- 📫 ติดตามข่าวสารได้ที่ Facebook [PyThaiNLP](https://www.facebook.com/pythainlp/)
Expand Down
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__ = "2.1.1"
__version__ = "2.1.2"

thai_consonants = "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" # 44 chars
thai_vowels = "ฤฦะ\u0e31าำ\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39เแโใไ\u0e45\u0e47" # 19
Expand Down
6 changes: 5 additions & 1 deletion pythainlp/tag/named_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ def get_ner(
self.temp = ""
self.sent = ""
for idx, (word, ner) in enumerate(self.sent_ner):
if "B-" in ner:
if "B-" in ner and self.temp != "":
self.sent += "</"+self.temp+">"
self.temp = ner.replace("B-", "")
self.sent += "<"+self.temp+">"
elif "B-" in ner:
self.temp = ner.replace("B-", "")
self.sent += "<"+self.temp+">"
elif "O" == ner and self.temp != "":
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 = 2.1.1
current_version = 2.1.2
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

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