summaryrefslogtreecommitdiff
path: root/dev-python/mecab-python/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /dev-python/mecab-python/files
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'dev-python/mecab-python/files')
-rw-r--r--dev-python/mecab-python/files/mecab-python-python3.patch66
1 files changed, 64 insertions, 2 deletions
diff --git a/dev-python/mecab-python/files/mecab-python-python3.patch b/dev-python/mecab-python/files/mecab-python-python3.patch
index 33c8d97ebb2b..d8fa167fff17 100644
--- a/dev-python/mecab-python/files/mecab-python-python3.patch
+++ b/dev-python/mecab-python/files/mecab-python-python3.patch
@@ -2,10 +2,72 @@
+++ b/setup.py
@@ -7,7 +7,7 @@
return os.popen(str).readlines()[0][:-1]
-
+
def cmd2(str):
- return string.split (cmd1(str))
+ return cmd1(str).split()
-
+
setup(name = "mecab-python",
version = cmd1("mecab-config --version"),
+--- a/test.py
++++ b/test.py
+@@ -9,17 +9,17 @@
+
+ try:
+
+- print MeCab.VERSION
++ print(MeCab.VERSION)
+
+ t = MeCab.Tagger (" ".join(sys.argv))
+
+- print t.parse(sentence)
++ print(t.parse(sentence))
+
+ m = t.parseToNode(sentence)
+ while m:
+- print m.surface, "\t", m.feature
+- m = m.next
+- print "EOS"
++ print(m.surface, "\t", m.feature)
++ m = m.next
++ print("EOS")
+
+ lattice = MeCab.Lattice()
+ t.parse(lattice)
+@@ -29,24 +29,24 @@
+ b = lattice.begin_nodes(i)
+ e = lattice.end_nodes(i)
+ while b:
+- print "B[%d] %s\t%s" % (i, b.surface, b.feature)
++ print("B[%d] %s\t%s" % (i, b.surface, b.feature))
+ b = b.bnext
+ while e:
+- print "E[%d] %s\t%s" % (i, e.surface, e.feature)
++ print("E[%d] %s\t%s" % (i, e.surface, e.feature))
+ e = e.bnext
+- print "EOS";
++ print("EOS");
+
+ d = t.dictionary_info()
+ while d:
+- print "filename: %s" % d.filename
+- print "charset: %s" % d.charset
+- print "size: %d" % d.size
+- print "type: %d" % d.type
+- print "lsize: %d" % d.lsize
+- print "rsize: %d" % d.rsize
+- print "version: %d" % d.version
+- d = d.next
++ print("filename: %s" % d.filename)
++ print("charset: %s" % d.charset)
++ print("size: %d" % d.size)
++ print("type: %d" % d.type)
++ print("lsize: %d" % d.lsize)
++ print("rsize: %d" % d.rsize)
++ print("version: %d" % d.version)
++ d = d.next
+
+-except RuntimeError, e:
+- print "RuntimeError:", e;
++except RuntimeError as e:
++ print("RuntimeError:", e);