Open tien-le opened 3 years ago
Then, I updated our file "./sudachipy/lattice.pxd" (remove "const" in line "cdef const short[:,:] connect_costs") as follows
from .latticenode cimport LatticeNode
cdef extern from "limits.h":
cdef int INT_MAX
cdef class Lattice:
cdef int size
cdef int capacity
cdef LatticeNode eos_node
cdef list end_lists
cdef object grammar
cdef object eos_params
# cdef const short[:,:] connect_costs
cdef short[:,:] connect_costs
cpdef void resize(self, int size)
cpdef void insert(self, int begin, int end, LatticeNode node)
cdef void connect_node(self, LatticeNode r_node)
cdef void connect_eos_node(self)
Then, building is okie as follows:
$ ../bin/python.sh setup.py build_ext --inplace
running build_ext
skipping 'sudachipy/latticenode.c' Cython extension (up-to-date)
cythoning sudachipy/lattice.pyx to sudachipy/lattice.c
building 'sudachipy.lattice' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/user/python/include/python3.6m -c sudachipy/lattice.c -o build/temp.linux-x86_64-3.6/sudachipy/lattice.o
gcc -pthread -shared -L/home/konverso/dev/installer/kbot/3rdparty/zlib-1.2.11/lib -L/home/user/python/sqlite-autoconf-3170000/lib -L/home/user/python/bzip2-1.0.6/lib -L/home/user/python/openssl-1.0.2r/lib -L/usr/lib/x86_64-linux-gnu build/temp.linux-x86_64-3.6/sudachipy/lattice.o -L/home/user/python/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/sudachipy/lattice.cpython-36m-x86_64-linux-gnu.so
cythoning sudachipy/tokenizer.pyx to sudachipy/tokenizer.c
building 'sudachipy.tokenizer' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/user/python/include/python3.6m -c sudachipy/tokenizer.c -o build/temp.linux-x86_64-3.6/sudachipy/tokenizer.o
gcc -pthread -shared -L/home/user/python/zlib-1.2.11/lib -L/home/user/python/sqlite-autoconf-3170000/lib -L/home/user/python/bzip2-1.0.6/lib -L/home/user/python/openssl-1.0.2r/lib -L/usr/lib/x86_64-linux-gnu build/temp.linux-x86_64-3.6/sudachipy/tokenizer.o -L/home/user/python/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/sudachipy/tokenizer.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/sudachipy/latticenode.cpython-36m-x86_64-linux-gnu.so -> sudachipy
copying build/lib.linux-x86_64-3.6/sudachipy/lattice.cpython-36m-x86_64-linux-gnu.so -> sudachipy
copying build/lib.linux-x86_64-3.6/sudachipy/tokenizer.cpython-36m-x86_64-linux-gnu.so -> sudachipy
Thank you. We don't have time right now, so we'll look into it later.
Hi, After building the latest codes from git (branch "develop"), I have the following issue:
Can you show me how to tackle the above issue, please? Thanks advance for your help.