mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge with stable.
This commit is contained in:
commit
d06ede265d
2
CHANGES
2
CHANGES
@ -190,6 +190,8 @@ Bugs fixed
|
||||
develop builder extensions. Thanks to Takeshi Komiya.
|
||||
* #1584: Point to master doc in HTML "top" link.
|
||||
* #1585: Autosummary of modules broken in Sphinx-1.2.3.
|
||||
* #1610: Sphinx cause AttributeError when MeCab search option is enabled and
|
||||
python-mecab is not installed.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
1
EXAMPLES
1
EXAMPLES
@ -51,6 +51,7 @@ Documentation using the default theme
|
||||
* PyMQI: http://pythonhosted.org/pymqi/
|
||||
* PyPubSub: http://pubsub.sourceforge.net/
|
||||
* pyrticle: http://documen.tician.de/pyrticle/
|
||||
* pySPACE: http://pyspace.github.io/pyspace/
|
||||
* Python: http://docs.python.org/
|
||||
* python-apt: http://apt.alioth.debian.org/python-apt-doc/
|
||||
* PyUblas: http://documen.tician.de/pyublas/
|
||||
|
@ -48,7 +48,7 @@ class MecabBinder(object):
|
||||
result = self.native.parse(input2)
|
||||
else:
|
||||
result = self.ctypes_libmecab.mecab_sparse_tostr(
|
||||
self.ctypes_mecab, input)
|
||||
self.ctypes_mecab, input.encode(self.dict_encode))
|
||||
return result.decode(self.dict_encode).split(' ')
|
||||
|
||||
def init_native(self, options):
|
||||
@ -85,7 +85,7 @@ class MecabBinder(object):
|
||||
|
||||
self.ctypes_libmecab = ctypes.CDLL(libpath)
|
||||
self.ctypes_libmecab.mecab_sparse_tostr.restype = ctypes.c_char_p
|
||||
self.ctypes_mecab = self.libmecab.mecab_new2(param)
|
||||
self.ctypes_mecab = self.ctypes_libmecab.mecab_new2(param)
|
||||
|
||||
def __del__(self):
|
||||
if self.ctypes_libmecab:
|
||||
@ -263,7 +263,6 @@ class SearchJapanese(SearchLanguage):
|
||||
if type not in ('mecab', 'default'):
|
||||
raise ValueError(("Japanese tokenizer's type should be 'mecab'"
|
||||
" or 'default'"))
|
||||
self.libmecab = None
|
||||
if type == 'mecab':
|
||||
self.splitter = MecabBinder(options)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user