Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[offline-renderer] mecab appears to be broken on Ubuntu > 10.x

Catch the exception an issue a warning instead.

This probably means all Japanese text in a document will be omitted

Need to figure out what happened to the mecab library/API to remove
all the calls we are using.

This change should allow some form of test build to continue
until things can be sorted out.

If anyone has any ideas why
the sentence_length attribute and the begin_node_list() end_node_list()
methods have disappeared; or if the mecab.tagger() needs different arguments
please let us know.

Signed-off-by: Christopher Hall <>
  • Loading branch information...
commit 3997434ab32053c74f5fb9756b0175f4ce14dcb5 1 parent 47e1a80
Christopher Hall hxw authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 host-tools/offline-renderer/
6 host-tools/offline-renderer/
@@ -218,7 +218,11 @@ def trans(self, text):
text = text.encode('utf-8')
n = self.mecab.parseToNode(text)
- slen = n.sentence_length;
+ try:
+ slen = n.sentence_length;
+ except AttributeError as e:
+ print('**AttributeError(sentence_length) on "{t:s}"\n'.format(t=text))
+ slen = -1
processed_len = 0
for i in range(slen + 1):
b = n.begin_node_list(i)
Please sign in to comment.
Something went wrong with that request. Please try again.