eranroz / hspellpy Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for Hspell
License: GNU Affero General Public License v3.0
Python wrapper for Hspell
License: GNU Affero General Public License v3.0
@eranroz - Thanks for this repository, I've been looking for something like that for a while.
I am running into problems with setup.py
both when trying it through the command line and via pip
.
Whenever I try running either python3 setup.py install
or python setup.py install
I am getting similar errors:
$ python3 setup.py install
running install
running build
running build_ext
building 'HspellPy' extension
creating build
creating build/temp.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include -I/usr/include/python3.4m -c pyhspell.c -o build/temp.linux-x86_64-3.4/pyhspell.o
creating build/lib.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/pyhspell.o /usr/local/lib/libhspell.a -L/usr/local/lib -o build/lib.linux-x86_64-3.4/HspellPy.cpython-34m.so
/usr/bin/ld: /usr/local/lib/libhspell.a(libhspell.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libhspell.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
And:
$ python setup.py install
running install
running build
running build_ext
building 'HspellPy' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c pyhspell.c -o build/temp.linux-x86_64-2.7/pyhspell.o
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pyhspell.o /usr/local/lib/libhspell.a -L/usr/local/lib -o build/lib.linux-x86_64-2.7/HspellPy.so
/usr/bin/ld: /usr/local/lib/libhspell.a(libhspell.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libhspell.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
The result of pip install HspellPy
, pip.log
, is found in this link.
Any idea how to resolve this? It may have something to do with mismatching architectures for compilation?
If it helps, here's the output of /usr/local/lib$ file libhspell.so.0
:
libhspell.so.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=9ca0880a6a2c082b4af5465485d22fdaae1ca447, not stripped
Also, could you upload your build outputs to the repository (or someplace else)?
Thanks!
Title pretty much says it all.
how it works in the shell (hspell 1.2 and 1.3):
$ hsp -l <<< כעב
צירוף חוקי: כ+עב
עב(ע,ז,יחיד)
עב(ע,ז,יחיד,סמיכות)
(hsp
is my wrapper script that converts between the system locale and ISO-8859-8)
how it works in Python (3.6):
>>> from HspellPy import Hspell
>>> hs = Hspell(linguistics=True)
>>> hs.linginfo('כעב')
[]
Thanks for this lib, by the way. It's very useful for a project I'm working on. I was going to send a patch, but then I discovered this stuff is all C and I don't have a clue about that. Sorry I can't be more helpful.
(P.S. the current behavior is actually very convenient for my project, since I'm testing exactly whether the form exists by itself or it's a prefix, but I figured you'd like to know)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.