Skip to content

Commit

Permalink
Merge branch 'hotfix/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
emfomy committed Apr 27, 2020
2 parents 75da5c5 + f93f2e2 commit ea6cc1c
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Introduction
============

.. attention::
Please use `CKIPNLP <https://pypi.org/project/ckipnlp/>`_ for structured data types and pipeline drivers.
Please use `CKIPNLP <https://ckipnlp.readthedocs.io/>`_ for structured data types and pipeline drivers.

Git
---
Expand Down Expand Up @@ -63,12 +63,12 @@ https://ckip-classic.readthedocs.io/
|ReadTheDocs Home|

.. |ReadTheDocs Home| image:: https://img.shields.io/website/https/ckip-classic.readthedocs.io.svg?maxAge=3600&up_message=online&down_message=offline
:target: http://ckip-classic.readthedocs.io
:target: https://ckip-classic.readthedocs.io

Contributers
------------

* `Mu Yang <http://muyang.pro>`_ at `CKIP <https://ckip.iis.sinica.edu.tw>`_ (Author & Maintainer)
* `Mu Yang <https://muyang.pro>`_ at `CKIP <https://ckip.iis.sinica.edu.tw>`_ (Author & Maintainer)
* `Wei-Yun Ma <https://www.iis.sinica.edu.tw/pages/ma/>`_ at `CKIP <https://ckip.iis.sinica.edu.tw>`_ (Maintainer)

External Links
Expand All @@ -79,8 +79,8 @@ External Links
Requirements
------------

* `Python <http://www.python.org>`_ 3.5+
* `Cython <http://cython.org>`_ 0.29+
* `Python <https://www.python.org>`_ 3.5+
* `Cython <https://cython.org>`_ 0.29+

.. attention::
For Python 2 users, please use `PyCkip 0.4.2 <https://pypi.org/project/pyckip/0.4.2/>`_ instead.
Expand Down Expand Up @@ -146,7 +146,7 @@ Installation Options
Usage
=====

See http://ckip-classic.readthedocs.io/ for API details.
See https://ckip-classic.readthedocs.io/ for API details.

CKIPWS
------
Expand Down
2 changes: 1 addition & 1 deletion ckip_classic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

__pkgname__ = 'ckip-classic'
__title__ = 'CkipClassic'
__version__ = '1.0.1'
__version__ = '1.0.2'
__description__ = 'CKIP Classic NLP Tools'
__license__ = 'CC BY-NC-SA 4.0'

Expand Down
12 changes: 6 additions & 6 deletions ckip_classic/ini.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def create_ws_lex(*lex_list
f_lex.flush()
return lex_file, f_lex

def create_ws_ini(*, # pylint: disable=too-many-statements
def create_ws_ini(*, # pylint: disable=too-many-statements
data2_dir=None,
lex_file=None,
new_style_format=False,
Expand Down Expand Up @@ -78,7 +78,7 @@ def create_ws_ini(*, # pylint: disable=too-many-statements
Remember to close **f_ini** manually.
"""

# pylint: disable=invalid-name
# pylint: disable=invalid-name

f_ini = _tempfile.NamedTemporaryFile(mode='w')
ini_file = f_ini.name
Expand Down Expand Up @@ -353,7 +353,7 @@ def create_ws_ini(*, # pylint: disable=too-many-statements
f_ini.flush()
return ini_file, f_ini, options

def create_parser_ini(*, # pylint: disable=too-many-statements
def create_parser_ini(*, # pylint: disable=too-many-statements
ws_ini_file,
rule_dir=None,
rdb_dir=None,
Expand All @@ -373,7 +373,7 @@ def create_parser_ini(*, # pylint: disable=too-many-statements
the path to "RDB/".
do_ws : bool
do word-segmentation.
do word segmentation.
do_parse : bool
do parsing.
do_role : bool
Expand All @@ -393,7 +393,7 @@ def create_parser_ini(*, # pylint: disable=too-many-statements
Remember to close **f_ini** manually.
"""

# pylint: disable=invalid-name
# pylint: disable=invalid-name

f_ini = _tempfile.NamedTemporaryFile(mode='w')
ini_file = f_ini.name
Expand Down Expand Up @@ -422,7 +422,7 @@ def create_parser_ini(*, # pylint: disable=too-many-statements
if not do_ws and not do_role:
raise ValueError('Must select at least one task')
if do_ws and not do_role:
raise ValueError('Use ckipws.CkipWs for word-segmentation')
raise ValueError('Use ckipws.CkipWs for word segmentation')
if not do_ws and do_role:
assign_role_only = True
if do_ws and do_role:
Expand Down
16 changes: 8 additions & 8 deletions ckip_classic/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ def __init__(self, *,
if not ini_file:
ini_file, f_ini, kwargs = create_parser_ini(ws_ini_file=ws_ini_file, **kwargs)

def CkipParser(*, _=None): pass # pylint: disable=redefined-outer-name, invalid-name, multiple-statements
def CkipParser(*, _=None): pass # pylint: disable=redefined-outer-name, invalid-name, multiple-statements
CkipParser(**kwargs)

self.__core.init_data(ini_file)

try:
f_lex.close()
except: # pylint: disable=bare-except
except: # pylint: disable=bare-except
pass

try:
f_ws_ini.close()
except: # pylint: disable=bare-except
except: # pylint: disable=bare-except
pass

try:
f_ini.close()
except: # pylint: disable=bare-except
except: # pylint: disable=bare-except
pass

def __call__(self, text):
Expand All @@ -102,8 +102,8 @@ def apply(self, text):
text : str
the input sentence.
Return
------
Returns
-------
str
the output sentence.
Expand All @@ -120,8 +120,8 @@ def apply_list(self, ilist):
ilist : List[str]
the list of input sentences.
Return
------
Returns
-------
List[str]
the list of output sentences.
"""
Expand Down
14 changes: 7 additions & 7 deletions ckip_classic/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ def __init__(self, *,
if not ini_file:
ini_file, f_ini, kwargs = create_ws_ini(**kwargs)

def CkipWs(*, _=None): pass # pylint: disable=redefined-outer-name, invalid-name, multiple-statements
def CkipWs(*, _=None): pass # pylint: disable=redefined-outer-name, invalid-name, multiple-statements
CkipWs(**kwargs)

self.__core.init_data(ini_file)

try:
f_lex.close()
except: # pylint: disable=bare-except
except: # pylint: disable=bare-except
pass

try:
f_ini.close()
except: # pylint: disable=bare-except
except: # pylint: disable=bare-except
pass

def __call__(self, text):
Expand All @@ -88,8 +88,8 @@ def apply(self, text):
text : str
the input sentence.
Return
------
Returns
-------
str
the output sentence.
Expand All @@ -106,8 +106,8 @@ def apply_list(self, ilist):
ilist : List[str]
the list of input sentences.
Return
------
Returns
-------
List[str]
the list of output sentences.
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CKIP Classic NLP Tools
.. toctree::
:caption: Overview

src/readme
main/readme

.. toctree::
:caption: Contents
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def os_environ_prepend(name, dirpath):
else:
os.environ[name] = dirpath

class CommandMixin(object):
class CommandMixin:

user_options = [
('ws', None, 'with CKIPWS [default]'),
Expand Down

0 comments on commit ea6cc1c

Please sign in to comment.