Clean code, remove Python 2 compatibility code#134
Merged
wannaphong merged 20 commits intoPyThaiNLP:devfrom Oct 23, 2018
bact:dev
Merged
Clean code, remove Python 2 compatibility code#134wannaphong merged 20 commits intoPyThaiNLP:devfrom bact:dev
wannaphong merged 20 commits intoPyThaiNLP:devfrom
bact:dev
Conversation
- fix English->Thai keyboard pairs "\\": "ฃ" (used to be "]": "ฃ") in change.py - remove six dependency in code and in requirements.txt - remove from __future__ import *, from builtins import * - change codecs.open() to open(), remove import codecs - change u"..." to "..." strings - make consistent indentations - small docs addition - add __ prefix to private members of class - rename class thainer() to ThaiNameRecognizer() (CamelCase class name) - adjust some example cases, make them more concise
- replace u"..." with "..." strings
Member
|
โค้ดส่วน romanization กับ romanization_royin ทำการทดสอบแล้วไม่ผ่านครับ https://travis-ci.org/PyThaiNLP/pythainlp/jobs/444967011 |
wannaphong
reviewed
Oct 23, 2018
tests/__init__.py
Outdated
| self.assertEqual(romanize('แมว'), 'maeo') | ||
| self.assertEqual(romanize('แมว', 'pyicu'), 'mæw') | ||
| self.assertEqual(romanize("แมว"), "maeo") | ||
| self.assertEqual(romanize("แมว", "pyic"), "mæw") |
tests/__init__.py
Outdated
| engine = "royin" | ||
| self.assertEqual(romanize("แมว", engine=engine), "maeo") | ||
| self.assertEqual(romanize("เดือน", engine=engine), "duean") | ||
| self.assertEqual(romanize("ดู", engine=engine), "d") |
Member
Author
แก้ไขเรียบร้อย build + test ผ่านแล้วครับ ขอบคุณครับ |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"\\": "ฃ"(used to be"]": "ฃ") in change.pysixdependency in code and in requirements.txtfrom __future__ import *,from builtins import *codecs.open()toopen(), removeimport codecsu"..."to"..."strings__prefix to private members of classthainer()toThaiNameRecognizer()(CamelCase class name)ImportErrorinstead of sys.exit().ideafolder (IDE).ideafolder and other unused files (*.tool, etc.)