Git Product home page Git Product logo

hspellpy's People

Contributors

dankenigsberg avatar eranroz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hspellpy's Issues

Compilation errors on Ubuntu 15.04 (x64)

@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!

Hspell.linginfo() return an empty list if the given word can only be parsed as having a prefix.

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.