[python-mecab] add patch

Mamoru Tasaka mtasaka at fedoraproject.org
Sun Jan 8 18:42:22 UTC 2012


commit 53c4e6b8f397f5b331d38d01bb5d433039950f8c
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Mon Jan 9 03:42:18 2012 +0900

    add patch

 python-mecab-0.99-testfix.patch |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/python-mecab-0.99-testfix.patch b/python-mecab-0.99-testfix.patch
new file mode 100644
index 0000000..0d9dd60
--- /dev/null
+++ b/python-mecab-0.99-testfix.patch
@@ -0,0 +1,20 @@
+--- mecab-python-0.99/test.py.debug	2012-01-09 02:44:10.000000000 +0900
++++ mecab-python-0.99/test.py	2012-01-09 02:56:49.000000000 +0900
+@@ -21,11 +21,13 @@
+ 	m = m.next
+     print "EOS"
+ 
+-    n = t.parseToNode(sentence)
+-    len = n.sentence_length;
++    lattice = MeCab.Lattice()
++    lattice.set_sentence(sentence)
++    t.parse(sentence)
++    len = lattice.size()
+     for i in range(len + 1):
+-        b = n.begin_node_list(i)
+-        e = n.end_node_list(i)
++        b = lattice.begin_nodes(i)
++        e = lattice.end_nodes(i)
+         while b:
+             print "B[%d] %s\t%s" % (i, b.surface, b.feature)
+             b = b.bnext 


More information about the scm-commits mailing list