Closed elifssamplespace closed 3 years ago
I cannot reproduce it. The pip package seems to be working as expected. Therefore, I will mark this issue as wontfix.
It could be related to your local Python installation, or virtual env setup. Maybe you can try installing the package from within a fresh virtual env.
Here is how I'm testing it locally:
$ python3 -m venv analyzer_test
$ source analyzer_test/bin/activate
$ python3 -m pip install turkish-morphology
$ python
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from turkish_morphology import analyze
>>> analyze.surface_form("ev")
['(ev[NN]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare])+[Proper=False]', '(ev[NN]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare])+[Proper=True]', '(ev[NN]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom])+[Proper=False]', '(ev[NN]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom])+[Proper=True]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare]+[Copula=PresCop]+[PersonNumber=V3pl])+[Proper=False]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare]+[Copula=PresCop]+[PersonNumber=V3pl])+[Proper=True]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare]+[Copula=PresCop]+[PersonNumber=V3sg])+[Proper=False]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Bare]+[Copula=PresCop]+[PersonNumber=V3sg])+[Proper=True]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom]+[Copula=PresCop]+[PersonNumber=V3pl])+[Proper=False]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom]+[Copula=PresCop]+[PersonNumber=V3pl])+[Proper=True]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom]+[Copula=PresCop]+[PersonNumber=V3sg])+[Proper=False]', '(ev[NOMP]+[PersonNumber=A3sg]+[Possessive=Pnon]+[Case=Nom]+[Copula=PresCop]+[PersonNumber=V3sg])+[Proper=True]']
>>> exit()
Problem is here, Python 3.9 should be installed. Although readme says "To build and run the morphological analyzer install Bazel version 4.1.0, Python 3.7 (or a newer version)." I have tried with 3.8 first and got same error above...
Ah, true, sorry I missed that you were trying to build the analyzer with Python3.7.
We released a new version of the project (v1.2.4) which you can install using pip. It depends on a more recent version of OpenFst and Thrax, and the analyzer now builds with Python3.9. So by switching to Python3.9, you should be able to install the package using pip.
I updated the documentation to make it explicit.
Hi, I installed the repo via pip, and it was successfully installed. Then, when I tried to import the repo as shown "from turkish_morphology import analyze," it didn't work. I put the error below.
/usr/local/lib/python3.7/dist-packages/turkish_morphology/fst.py in()
20 from typing import Generator, Iterable, List, Optional
21
---> 22 from external.openfst import pywrapfst
23
24 _Arc = pywrapfst.Arc
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/lib/python3.7/dist-packages/external/openfst/pywrapfst.so)
How can I solve this problem?