mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Revert search/ja.py
It is not a part of 'testcase for #1860'. It's my miss commit. Sorry.
This commit is contained in:
parent
23eb0e24fc
commit
24c42817ed
@ -29,7 +29,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
native_module = False
|
native_module = False
|
||||||
|
|
||||||
from sphinx.errors import SphinxError
|
|
||||||
from sphinx.search import SearchLanguage
|
from sphinx.search import SearchLanguage
|
||||||
|
|
||||||
|
|
||||||
@ -50,14 +49,10 @@ class MecabBinder(object):
|
|||||||
else:
|
else:
|
||||||
result = self.ctypes_libmecab.mecab_sparse_tostr(
|
result = self.ctypes_libmecab.mecab_sparse_tostr(
|
||||||
self.ctypes_mecab, input.encode(self.dict_encode))
|
self.ctypes_mecab, input.encode(self.dict_encode))
|
||||||
if result is None:
|
|
||||||
raise SphinxError('Failed to tokenize text:\nMecab: %s\nInput:\n%s' %
|
|
||||||
(self.ctypes_mecab, input))
|
|
||||||
if PY3:
|
if PY3:
|
||||||
return result.split(' ')
|
return result.split(' ')
|
||||||
else:
|
else:
|
||||||
return result.decode(self.dict_encode).split(' ')
|
return result.decode(self.dict_encode).split(' ')
|
||||||
return result.decode(self.dict_encode).split(' ')
|
|
||||||
|
|
||||||
def init_native(self, options):
|
def init_native(self, options):
|
||||||
param = '-Owakati'
|
param = '-Owakati'
|
||||||
|
Loading…
Reference in New Issue
Block a user