Git Product home page Git Product logo

erickrf / nlpnet Goto Github PK

View Code? Open in Web Editor NEW
405.0 36.0 104.0 4.38 MB

A neural network architecture for NLP tasks, using cython for fast performance. Currently, it can perform POS tagging, SRL and dependency parsing.

Home Page: http://nilc.icmc.usp.br/nlpnet/

License: MIT License

Python 61.68% Cython 38.32%
nlp natural-language-processing neural-network pos-tagging semantic-role-labeling parsing

nlpnet's People

Contributors

andrecunha avatar danilons avatar erickrf avatar gitter-badger avatar gunthercox avatar iamtrask avatar lucas-cerqueira avatar

Stargazers

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

Watchers

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

nlpnet's Issues

nlpnet install error

Hey guys, I am trying to install the nlpnet lib but I getting an error, someone can help me?

ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qce58v27/nlpnet_5d97306497454c77a333d1e773fe5eb5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qce58v27/nlpnet_5d97306497454c77a333d1e773fe5eb5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-p8umiw52
         cwd: /tmp/pip-install-qce58v27/nlpnet_5d97306497454c77a333d1e773fe5eb5/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qce58v27/nlpnet_5d97306497454c77a333d1e773fe5eb5/setup.py", line 1, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cc/3f/a5bf348da1a3148acb810d5236bd1c832383fd1a98cb9c4ac3f3bf92ab72/nlpnet-1.2.4.tar.gz#sha256=b791110ad068e273d2fc664d94b2608d322184da6b2cd799f0e4d476f1631614 (from https://pypi.org/simple/nlpnet/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement nlpnet==1.2.4 (from versions: 1.2.3.macosx-10.9-x86_64, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.2.1, 1.2.2, 1.2.4)
ERROR: No matching distribution found for nlpnet==1.2.4

And I have numpy installed v1.21.0

nlpnet import error

Hello, I was trying to install nlpnet but I faced this error. I already important the microsoft build tools, nltk and updated numpy. Still I cannot solve the error. Could you help me?

ERROR: Command errored out with exit status 1:
command: 'C:\Users\Public\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\franco joao\AppData\Local\Temp\pip-install-78011e7f\nlpnet_72278bb9cbbe4b2f975dc611c37f0ed1\setup.py'"'"'; file='"'"'C:\Users\franco joao\AppData\Local\Temp\pip-install-78011e7f\nlpnet_72278bb9cbbe4b2f975dc611c37f0ed1\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\franco joao\AppData\Local\Temp\pip-wheel-qe2xbz1r'
cwd: C:\Users\franco joao\AppData\Local\Temp\pip-install-78011e7f\nlpnet_72278bb9cbbe4b2f975dc611c37f0ed1
Complete output (77 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\nlpnet
copying nlpnet\arguments.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\attributes.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\config.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\metadata.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\reader.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\taggers.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\utils.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet\word_dictionary.py -> build\lib.win-amd64-3.9\nlpnet
copying nlpnet_init_.py -> build\lib.win-amd64-3.9\nlpnet
creating build\lib.win-amd64-3.9\nlpnet\pos
copying nlpnet\pos\macmorphoreader.py -> build\lib.win-amd64-3.9\nlpnet\pos
copying nlpnet\pos\pos_reader.py -> build\lib.win-amd64-3.9\nlpnet\pos
copying nlpnet\pos_init_.py -> build\lib.win-amd64-3.9\nlpnet\pos
creating build\lib.win-amd64-3.9\nlpnet\srl
copying nlpnet\srl\srl_reader.py -> build\lib.win-amd64-3.9\nlpnet\srl
copying nlpnet\srl\train_srl.py -> build\lib.win-amd64-3.9\nlpnet\srl
copying nlpnet\srl_init_.py -> build\lib.win-amd64-3.9\nlpnet\srl
creating build\lib.win-amd64-3.9\nlpnet\parse
copying nlpnet\parse\parse_reader.py -> build\lib.win-amd64-3.9\nlpnet\parse
copying nlpnet\parse_init_.py -> build\lib.win-amd64-3.9\nlpnet\parse
running build_ext
building 'nlpnet.network' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\nlpnet
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I. -IC:\Users\Public\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\Public\Anaconda3\include -IC:\Users\Public\Anaconda3\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /Tcnlpnet/network.c /Fobuild\temp.win-amd64-3.9\Release\nlpnet/network.obj
network.c
C:\Users\Public\Anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
nlpnet/network.c(10165): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
nlpnet/network.c(12317): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
nlpnet/network.c(13722): warning C4244: '=': conversion from 'npy_intp' to 'int', possible loss of data
nlpnet/network.c(23369): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
nlpnet/network.c(25504): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
nlpnet/network.c(26295): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
nlpnet/network.c(30836): warning C4305: '=': truncation from 'double' to 'float'
nlpnet/network.c(33710): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(33835): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(36939): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(37192): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(37426): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(37679): warning C4244: 'function': conversion from 'npy_intp' to 'long', possible loss of data
nlpnet/network.c(44878): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
nlpnet/network.c(57798): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Public\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
nlpnet/network.c(57819): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Public\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
nlpnet/network.c(57831): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Public\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
nlpnet/network.c(57840): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\Public\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'

problem on initial import

On install in Python 3.5 in Win10, can't seem to get around:

running build_ext
building 'nlpnet.network' extension
error: [WinError 2] The system cannot find the file specified

where to get the model for posTag for english ?

hello, the posTag model seems to be for Portuguese in http://nilc.icmc.usp.br/nlpnet/models.html provided in your readme. but where to get the model for english for posTag?

thank you in advance!

Need clarity on Dependency Relations output by Dependency Parser.

Hi,

While using your dependency parser for English, I found that the dependency relations output by the parser are not in CoNLL Universal Dependency Relations format or, Stanford format. Can you please point me to a document/ page where I can find the meaning of these relations.

For eg:

For the sentence: "I want to take a leave today"
The output is:
1 I _ PRP PRP _ 2 SBJ
2 want _ VBP VBP _ 0 ROOT
3 to _ TO TO _ 2 OPRD
4 take _ VB VB _ 3 IM
5 a _ DT DT _ 6 NMOD
6 leave _ NN NN _ 4 OBJ
7 today _ NN NN _ 4 TMP

I cannot find what the relations 'IM', 'OPRD' mean, anywhere. The same sentence output by the Stanford dependency parser is:

1 I I PRP O 2 nsubj
2 want want VBP O 0 ROOT
3 to to TO O 4 mark
4 take take VB O 2 xcomp
5 a a DT O 6 det
6 leave leave NN O 4 dobj
7 today today NN DATE 4 nmod:tmod

Can you please help me in finding the meaning of these dependency relations.

Thanks in advance.

Arindam

Dropout

Favor, ignorar valores de Dropout caso sejam inexistentes.

Invalid data directory

I am trying to run your repository and getting the following issue:


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/nlpnet/taggers.py", line 307, in __init__
    super(DependencyParser, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nlpnet/taggers.py", line 190, in __init__
    self.paths = config.get_config_paths(data_dir)
  File "/usr/local/lib/python2.7/dist-packages/nlpnet/config.py", line 14, in get_config_paths
    assert os.path.isdir(directory), 'Invalid data directory'
AssertionError: Invalid data directory

Please help me soon. I am in a bit urgency.

nlpnet install error with pip on linux

Hi! I'm trying to install nlpnet with pip, but I keep getting the same error (ERROR: Failed building wheel for nlpnet) and then error: legacy-install-failure in the end. pip, wheel and setuptools are updated. Could you help me, please? I'm using python 3.9

pip install nlpnet
Collecting nlpnet
Using cached nlpnet-1.2.4.tar.gz (393 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.9.0 in ./anaconda3/lib/python3.9/site-packages (from nlpnet) (1.20.3)
Requirement already satisfied: nltk>=3.2.2 in ./anaconda3/lib/python3.9/site-packages (from nlpnet) (3.6.5)
Requirement already satisfied: six>=1.10 in ./anaconda3/lib/python3.9/site-packages (from nlpnet) (1.16.0)
Requirement already satisfied: h5py>=2.8.0rc1 in ./anaconda3/lib/python3.9/site-packages (from nlpnet) (3.3.0)
Requirement already satisfied: click in ./anaconda3/lib/python3.9/site-packages (from nltk>=3.2.2->nlpnet) (8.0.3)
Requirement already satisfied: joblib in ./anaconda3/lib/python3.9/site-packages (from nltk>=3.2.2->nlpnet) (1.1.0)
Requirement already satisfied: regex>=2021.8.3 in ./anaconda3/lib/python3.9/site-packages (from nltk>=3.2.2->nlpnet) (2021.8.3)
Requirement already satisfied: tqdm in ./anaconda3/lib/python3.9/site-packages (from nltk>=3.2.2->nlpnet) (4.62.3)
Building wheels for collected packages: nlpnet
Building wheel for nlpnet (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [188 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/attributes.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/arguments.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/metadata.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/taggers.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/config.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/utils.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/word_dictionary.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet
creating build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/pos_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/macmorphoreader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
creating build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/train_srl.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/srl_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
creating build/lib.linux-x86_64-cpython-39/nlpnet/parse
copying nlpnet/parse/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/parse
copying nlpnet/parse/parse_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/parse
running build_ext
building 'nlpnet.network' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/nlpnet
gcc -pthread -B /home/victor/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/victor/anaconda3/include -I/home/victor/anaconda3/include -fPIC -O2 -isystem /home/victor/anaconda3/include -fPIC -I. -I/home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/home/victor/anaconda3/include/python3.9 -c nlpnet/network.c -o build/temp.linux-x86_64-cpython-39/nlpnet/network.o
In file included from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from nlpnet/network.c:593:
/home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with "
| ^~~~~~~
nlpnet/network.c: In function ‘__Pyx_modinit_type_init_code’:
nlpnet/network.c:57798:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57798 | __pyx_type_6nlpnet_7network_Network.tp_print = 0;
| ^
nlpnet/network.c:57819:51: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57819 | __pyx_type_6nlpnet_7network_ConvolutionalNetwork.tp_print = 0;
| ^
nlpnet/network.c:57831:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57831 | __pyx_type_6nlpnet_7network_ConvolutionalDependencyNetwork.tp_print = 0;
| ^
nlpnet/network.c:57840:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57840 | __pyx_type_6nlpnet_7network___pyx_scope_struct__create_new.tp_print = 0;
| ^
nlpnet/network.c:57846:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57846 | __pyx_type_6nlpnet_7network___pyx_scope_struct_1_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57852:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57852 | __pyx_type_6nlpnet_7network___pyx_scope_struct_2_train.tp_print = 0;
| ^
nlpnet/network.c:57858:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57858 | __pyx_type_6nlpnet_7network___pyx_scope_struct_3_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57864:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57864 | __pyx_type_6nlpnet_7network___pyx_scope_struct_4__validate.tp_print = 0;
| ^
nlpnet/network.c:57870:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57870 | __pyx_type_6nlpnet_7network___pyx_scope_struct_5_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57876:62: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57876 | __pyx_type_6nlpnet_7network___pyx_scope_struct_6_create_new.tp_print = 0;
| ^
nlpnet/network.c:57882:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57882 | __pyx_type_6nlpnet_7network___pyx_scope_struct_7_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57888:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57888 | __pyx_type_6nlpnet_7network___pyx_scope_struct_8_train.tp_print = 0;
| ^
nlpnet/network.c:57894:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57894 | __pyx_type_6nlpnet_7network___pyx_scope_struct_9_genexpr.tp_print = 0;
| ^
nlpnet/network.c: In function ‘__Pyx_ParseOptionalKeywords’:
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nlpnet
Running setup.py clean for nlpnet
Failed to build nlpnet
Installing collected packages: nlpnet
Running setup.py install for nlpnet ... error
error: subprocess-exited-with-error

× Running setup.py install for nlpnet did not run successfully.
│ exit code: 1
╰─> [190 lines of output]
running install
/home/victor/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/attributes.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/arguments.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/metadata.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/taggers.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/config.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/utils.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/word_dictionary.py -> build/lib.linux-x86_64-cpython-39/nlpnet
copying nlpnet/reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet
creating build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/pos_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
copying nlpnet/pos/macmorphoreader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/pos
creating build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/train_srl.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
copying nlpnet/srl/srl_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/srl
creating build/lib.linux-x86_64-cpython-39/nlpnet/parse
copying nlpnet/parse/init.py -> build/lib.linux-x86_64-cpython-39/nlpnet/parse
copying nlpnet/parse/parse_reader.py -> build/lib.linux-x86_64-cpython-39/nlpnet/parse
running build_ext
building 'nlpnet.network' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/nlpnet
gcc -pthread -B /home/victor/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/victor/anaconda3/include -I/home/victor/anaconda3/include -fPIC -O2 -isystem /home/victor/anaconda3/include -fPIC -I. -I/home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/home/victor/anaconda3/include/python3.9 -c nlpnet/network.c -o build/temp.linux-x86_64-cpython-39/nlpnet/network.o
In file included from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from nlpnet/network.c:593:
/home/victor/anaconda3/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with "
| ^~~~~~~
nlpnet/network.c: In function ‘__Pyx_modinit_type_init_code’:
nlpnet/network.c:57798:38: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57798 | __pyx_type_6nlpnet_7network_Network.tp_print = 0;
| ^
nlpnet/network.c:57819:51: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57819 | __pyx_type_6nlpnet_7network_ConvolutionalNetwork.tp_print = 0;
| ^
nlpnet/network.c:57831:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57831 | __pyx_type_6nlpnet_7network_ConvolutionalDependencyNetwork.tp_print = 0;
| ^
nlpnet/network.c:57840:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57840 | __pyx_type_6nlpnet_7network___pyx_scope_struct__create_new.tp_print = 0;
| ^
nlpnet/network.c:57846:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57846 | __pyx_type_6nlpnet_7network___pyx_scope_struct_1_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57852:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57852 | __pyx_type_6nlpnet_7network___pyx_scope_struct_2_train.tp_print = 0;
| ^
nlpnet/network.c:57858:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57858 | __pyx_type_6nlpnet_7network___pyx_scope_struct_3_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57864:61: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57864 | __pyx_type_6nlpnet_7network___pyx_scope_struct_4__validate.tp_print = 0;
| ^
nlpnet/network.c:57870:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57870 | __pyx_type_6nlpnet_7network___pyx_scope_struct_5_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57876:62: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57876 | __pyx_type_6nlpnet_7network___pyx_scope_struct_6_create_new.tp_print = 0;
| ^
nlpnet/network.c:57882:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57882 | __pyx_type_6nlpnet_7network___pyx_scope_struct_7_genexpr.tp_print = 0;
| ^
nlpnet/network.c:57888:57: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57888 | __pyx_type_6nlpnet_7network___pyx_scope_struct_8_train.tp_print = 0;
| ^
nlpnet/network.c:57894:59: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
57894 | __pyx_type_6nlpnet_7network___pyx_scope_struct_9_genexpr.tp_print = 0;
| ^
nlpnet/network.c: In function ‘__Pyx_ParseOptionalKeywords’:
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59641:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59641 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
nlpnet/network.c:59657:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
59657 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /home/victor/anaconda3/include/python3.9/unicodeobject.h:1026,
from /home/victor/anaconda3/include/python3.9/Python.h:106,
from nlpnet/network.c:4:
/home/victor/anaconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> nlpnet

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

expected 'FLOAT_t' but got 'float'

I downloaded the english embeddings from the polyglot website, and then ran the following.

Andrews-MacBook-Pro:nlpnet atrask$ python ./bin/nlpnet-load-embeddings.py polyglot polyglot-en.pkl
Loading data...
Saving nlpnet data...
Andrews-MacBook-Pro:nlpnet atrask$ python ./bin/nlpnet-train.py pos --gold resources/en-ud-train.conllu --dev resources/en-ud-dev.conllu -e 20 -l 0.001 --load-features
Reading training data...
Loading vocabulary
Creating new network...
Loading word type features...
Created new network with the following layer sizes: 320, 100, 17

Reading validation data...
Loading vocabulary
Training for up to 20 epochs
Traceback (most recent call last):
File "./bin/nlpnet-train.py", line 258, in
train(nn, text_reader, args)
File "./bin/nlpnet-train.py", line 232, in train
args.iterations, intervals, args.accuracy)
File "nlpnet\network.pyx", line 625, in nlpnet.network.Network.train (nlpnet/network.c:9982)
File "nlpnet\network.pyx", line 688, in nlpnet.network.Network._train_epoch (nlpnet/network.c:11032)
File "nlpnet\network.pyx", line 325, in nlpnet.network.Network._tag_sentence (nlpnet/network.c:6221)
File "nlpnet\network.pyx", line 782, in nlpnet.network.Network._backpropagate (nlpnet/network.c:12426)
ValueError: Buffer dtype mismatch, expected 'FLOAT_t' but got 'float'

No such file or directory: '/home/eduardo.pittol/nlpnet-data/prefix-features-pos.npy'

I put in the same dir the content of this two compressed files:
http://nilc.icmc.usp.br/nilc/download/nlpnet-data.zip
http://143.107.183.175:21580/nlpnet/data/pos-pt.tgz

When I call tagger = nlpnet.POSTagger(). Show this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/nlpnet/taggers.py", line 170, in __init__
    self._load_data()
  File "/usr/lib64/python2.7/site-packages/nlpnet/taggers.py", line 274, in _load_data
    self.nn = load_network(md)
  File "/usr/lib64/python2.7/site-packages/nlpnet/taggers.py", line 41, in load_network
    prefix_features = utils.load_features_from_file(md.paths[md.prefix_features])
  File "/usr/lib64/python2.7/site-packages/nlpnet/utils.py", line 402, in load_features_from_file
    return np.load(features_file)
  File "/usr/lib64/python2.7/site-packages/numpy/lib/npyio.py", line 369, in load
    fid = open(file, "rb")
IOError: [Errno 2] No such file or directory: '/home/eduardo.pittol/nlpnet-data/prefix-features-pos.npy'

KeyError while using nlpnet-test.py with --id

nlpnet-test.py srl -v --gold outputs/projected/final_nlpnet.txt --data py3-models/ --id
/home/baks/GSOC/new/local/lib/python2.7/site-packages/h5py/init.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._conv import register_converters as _register_converters
/home/baks/GSOC/new/local/lib/python2.7/site-packages/h5py/init.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
/home/baks/GSOC/new/local/lib/python2.7/site-packages/h5py/_hl/group.py:22: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .. import h5g, h5i, h5o, h5r, h5t, h5l, h5p
Loading network
Done
Loading text reader...
Loading vocabulary
Done. Dictionary size is 3639 types
Done
Traceback (most recent call last):
File "/home/baks/GSOC/new/bin/nlpnet-test.py", line 708, in
evaluate_srl_identify(args.gold)
File "/home/baks/GSOC/new/bin/nlpnet-test.py", line 580, in evaluate_srl_identify
gold_itd, net_itd)
File "/home/baks/GSOC/new/bin/nlpnet-test.py", line 296, in sentence_recall
net_tag = network_tag_dict[net_tag]
KeyError: 48

Error when installing nlpnet with pip3 on Mac Catalina

Hi, im trying to install nlpnet on macbook, and getting the following error. Im using Python 3.9

ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-install-x8zlxecw/nlpnet/setup.py'"'"'; file='"'"'/private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-install-x8zlxecw/nlpnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-record-hsyrw1m_/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/nlpnet
cwd: /private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-install-x8zlxecw/nlpnet/
Complete output (247 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/config.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/metadata.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/attributes.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/arguments.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/init.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/reader.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/taggers.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/utils.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
copying nlpnet/word_dictionary.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet
creating build/lib.macosx-10.9-x86_64-3.9/nlpnet/pos
copying nlpnet/pos/macmorphoreader.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/pos
copying nlpnet/pos/init.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/pos
copying nlpnet/pos/pos_reader.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/pos
creating build/lib.macosx-10.9-x86_64-3.9/nlpnet/srl
copying nlpnet/srl/srl_reader.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/srl
copying nlpnet/srl/train_srl.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/srl
copying nlpnet/srl/init.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/srl
creating build/lib.macosx-10.9-x86_64-3.9/nlpnet/parse
copying nlpnet/parse/parse_reader.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/parse
copying nlpnet/parse/init.py -> build/lib.macosx-10.9-x86_64-3.9/nlpnet/parse
running build_ext
building 'nlpnet.network' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/nlpnet
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I. -I/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c nlpnet/network.c -o build/temp.macosx-10.9-x86_64-3.9/nlpnet/network.o
In file included from nlpnet/network.c:593:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with "
^
nlpnet/network.c:57798:39: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network_Network.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57819:52: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network_ConvolutionalNetwork.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57831:62: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network_ConvolutionalDependencyNetwork.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57840:62: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct__create_new.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57846:60: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_1_genexpr.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57852:58: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_2_train.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57858:60: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_3_genexpr.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57864:62: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_4__validate.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57870:60: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_5_genexpr.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57876:63: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_6_create_new.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57882:60: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_7_genexpr.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57888:58: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_8_train.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:57894:60: error: no member named 'tp_print' in 'struct _typeobject'
__pyx_type_6nlpnet_7network___pyx_scope_struct_9_genexpr.tp_print = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nlpnet/network.c:59641:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op) :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59641:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59641:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op)))
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59641:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op) :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59641:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59641:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op)))
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op) :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op)))
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op) :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
nlpnet/network.c:59657:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
(PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 :
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
PyUnicode_WSTR_LENGTH(op)))
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
#define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject
)op)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:445:1: note: 'PyUnicode_get_wstr_length' has been explicitly marked deprecated here
Py_DEPRECATED(3.3)
^
/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
13 warnings and 13 errors generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-install-x8zlxecw/nlpnet/setup.py'"'"'; file='"'"'/private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-install-x8zlxecw/nlpnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/l6/qy7sqc8d04x8ss3gw2hs_spc0000gn/T/pip-record-hsyrw1m
/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/nlpnet Check the logs for full command output.

How to train new SRL model ?

Hi, nlpnet is cool, but i cannot find good tutorial on how to train my custom Semantic Role labeling model (language other than english).
I read docs http://nilc.icmc.usp.br/nlpnet/training-srl.html and tried to reproduce, but first problem i faced is that there is no such file nlpnet-train.py.
I need to get new SRL model from text, so i tried to run in console:
python train_srl.py srl pred --gold train_google.txt --data srl-model/

where train_google.txt - is txt file with raw text, train_srl.py is file in \Lib\site-packages\nlpnet\srl
But nothing happens, no errors, no new folder created
Am i right?

Python 3.7.3 incompability

Is it possible to ship the module with newer version of the .c file generated by Cython? I tried to install nlpnet on a Arch Linux (kernel version 5.0.11) using Python version 3.7.3 and got the following error:

long error log

ERROR: Complete output from command /home/user/.virtualenv/locomotive/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ki92nbew/nlpnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-y_o3b2ni --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/word_dictionary.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/utils.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/taggers.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/reader.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/metadata.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/config.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/attributes.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/arguments.py -> build/lib.linux-x86_64-3.7/nlpnet
  copying nlpnet/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet
  creating build/lib.linux-x86_64-3.7/nlpnet/pos
  copying nlpnet/pos/pos_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
  copying nlpnet/pos/macmorphoreader.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
  copying nlpnet/pos/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
  creating build/lib.linux-x86_64-3.7/nlpnet/srl
  copying nlpnet/srl/train_srl.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
  copying nlpnet/srl/srl_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
  copying nlpnet/srl/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
  creating build/lib.linux-x86_64-3.7/nlpnet/parse
  copying nlpnet/parse/parse_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/parse
  copying nlpnet/parse/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/parse
  running build_ext
  building 'nlpnet.network' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/nlpnet
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I. -I/home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c nlpnet/network.c -o build/temp.linux-x86_64-3.7/nlpnet/network.o
  In file included from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                   from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from nlpnet/network.c:274:
  /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  nlpnet/network.c: In function ‘__Pyx__ExceptionSave’:
  nlpnet/network.c:52040:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       *type = tstate->exc_type;
                       ^~~~~~~~
                       curexc_type
  nlpnet/network.c:52041:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       *value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
  nlpnet/network.c:52042:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       *tb = tstate->exc_traceback;
                     ^~~~~~~~~~~~~
                     curexc_traceback
  nlpnet/network.c: In function ‘__Pyx__ExceptionReset’:
  nlpnet/network.c:52049:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tmp_type = tstate->exc_type;
                          ^~~~~~~~
                          curexc_type
  nlpnet/network.c:52050:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tmp_value = tstate->exc_value;
                           ^~~~~~~~~
                           curexc_value
  nlpnet/network.c:52051:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tmp_tb = tstate->exc_traceback;
                        ^~~~~~~~~~~~~
                        curexc_traceback
  nlpnet/network.c:52052:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tstate->exc_type = type;
               ^~~~~~~~
               curexc_type
  nlpnet/network.c:52053:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tstate->exc_value = value;
               ^~~~~~~~~
               curexc_value
  nlpnet/network.c:52054:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tstate->exc_traceback = tb;
               ^~~~~~~~~~~~~
               curexc_traceback
  nlpnet/network.c: In function ‘__Pyx__GetException’:
  nlpnet/network.c:52109:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tmp_type = tstate->exc_type;
                          ^~~~~~~~
                          curexc_type
  nlpnet/network.c:52110:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tmp_value = tstate->exc_value;
                           ^~~~~~~~~
                           curexc_value
  nlpnet/network.c:52111:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tmp_tb = tstate->exc_traceback;
                        ^~~~~~~~~~~~~
                        curexc_traceback
  nlpnet/network.c:52112:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tstate->exc_type = local_type;
               ^~~~~~~~
               curexc_type
  nlpnet/network.c:52113:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tstate->exc_value = local_value;
               ^~~~~~~~~
               curexc_value
  nlpnet/network.c:52114:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tstate->exc_traceback = local_tb;
               ^~~~~~~~~~~~~
               curexc_traceback
  nlpnet/network.c: In function ‘__Pyx__ExceptionSwap’:
  nlpnet/network.c:54637:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tmp_type = tstate->exc_type;
                          ^~~~~~~~
                          curexc_type
  nlpnet/network.c:54638:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tmp_value = tstate->exc_value;
                           ^~~~~~~~~
                           curexc_value
  nlpnet/network.c:54639:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tmp_tb = tstate->exc_traceback;
                        ^~~~~~~~~~~~~
                        curexc_traceback
  nlpnet/network.c:54640:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
       tstate->exc_type = *type;
               ^~~~~~~~
               curexc_type
  nlpnet/network.c:54641:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
       tstate->exc_value = *value;
               ^~~~~~~~~
               curexc_value
  nlpnet/network.c:54642:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
       tstate->exc_traceback = *tb;
               ^~~~~~~~~~~~~
               curexc_traceback
  In file included from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21,
                   from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from nlpnet/network.c:274:
  At top level:
  /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
   _import_array(void)
   ^~~~~~~~~~~~~
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for nlpnet
    ERROR: Complete output from command /home/user/.virtualenv/locomotive/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ki92nbew/nlpnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-jy69pgbc/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/.virtualenv/locomotive/include/site/python3.7/nlpnet:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/word_dictionary.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/utils.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/taggers.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/reader.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/metadata.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/config.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/attributes.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/arguments.py -> build/lib.linux-x86_64-3.7/nlpnet
    copying nlpnet/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet
    creating build/lib.linux-x86_64-3.7/nlpnet/pos
    copying nlpnet/pos/pos_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
    copying nlpnet/pos/macmorphoreader.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
    copying nlpnet/pos/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/pos
    creating build/lib.linux-x86_64-3.7/nlpnet/srl
    copying nlpnet/srl/train_srl.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
    copying nlpnet/srl/srl_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
    copying nlpnet/srl/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/srl
    creating build/lib.linux-x86_64-3.7/nlpnet/parse
    copying nlpnet/parse/parse_reader.py -> build/lib.linux-x86_64-3.7/nlpnet/parse
    copying nlpnet/parse/__init__.py -> build/lib.linux-x86_64-3.7/nlpnet/parse
    running build_ext
    building 'nlpnet.network' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/nlpnet
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I. -I/home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c nlpnet/network.c -o build/temp.linux-x86_64-3.7/nlpnet/network.o
    In file included from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                     from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from nlpnet/network.c:274:
    /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    nlpnet/network.c: In function ‘__Pyx__ExceptionSave’:
    nlpnet/network.c:52040:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         *type = tstate->exc_type;
                         ^~~~~~~~
                         curexc_type
    nlpnet/network.c:52041:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         *value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
    nlpnet/network.c:52042:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         *tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
    nlpnet/network.c: In function ‘__Pyx__ExceptionReset’:
    nlpnet/network.c:52049:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    nlpnet/network.c:52050:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    nlpnet/network.c:52051:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    nlpnet/network.c:52052:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = type;
                 ^~~~~~~~
                 curexc_type
    nlpnet/network.c:52053:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = value;
                 ^~~~~~~~~
                 curexc_value
    nlpnet/network.c:52054:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    nlpnet/network.c: In function ‘__Pyx__GetException’:
    nlpnet/network.c:52109:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    nlpnet/network.c:52110:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    nlpnet/network.c:52111:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    nlpnet/network.c:52112:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = local_type;
                 ^~~~~~~~
                 curexc_type
    nlpnet/network.c:52113:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = local_value;
                 ^~~~~~~~~
                 curexc_value
    nlpnet/network.c:52114:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = local_tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    nlpnet/network.c: In function ‘__Pyx__ExceptionSwap’:
    nlpnet/network.c:54637:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    nlpnet/network.c:54638:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    nlpnet/network.c:54639:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    nlpnet/network.c:54640:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = *type;
                 ^~~~~~~~
                 curexc_type
    nlpnet/network.c:54641:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = *value;
                 ^~~~~~~~~
                 curexc_value
    nlpnet/network.c:54642:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = *tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    In file included from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21,
                     from /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from nlpnet/network.c:274:
    At top level:
    /home/user/.virtualenv/locomotive/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
     _import_array(void)
     ^~~~~~~~~~~~~
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/home/user/.virtualenv/locomotive/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ki92nbew/nlpnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-jy69pgbc/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/.virtualenv/locomotive/include/site/python3.7/nlpnet" failed with error code 1 in /tmp/pip-install-ki92nbew/nlpnet/

I was able to cythonize the network.pyx file using Cython 0.29.7 and use the module.

Still, it would be nice if the module contained a version that is supported by Python 3.7.3 so that it could be easily installed with pip.

[IOError: Failed to interpret file 'models/srl-class-predicates.npz' as a pickle] Error while running nlpnet-test.py

I'm facing an issue while doing predicate detection with trained SRL models on a new language.
nlpnet-train.py is able to train succesfully. But, when I run the standalone command with :
nlpnet-test.py srl -v --gold outputs/projected/1final_nlpnet.data --data models/ --preds

I get the following error:
/home/baks/GSOC/ENV/local/lib/python2.7/site-packages/h5py/__init__.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from ._conv import register_converters as _register_converters /home/baks/GSOC/ENV/local/lib/python2.7/site-packages/h5py/__init__.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z /home/baks/GSOC/ENV/local/lib/python2.7/site-packages/h5py/_hl/group.py:22: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 from .. import h5g, h5i, h5o, h5r, h5t, h5l, h5p Loading network Traceback (most recent call last): File "/home/baks/GSOC/ENV/bin/nlpnet-test.py", line 710, in <module> evaluate_srl_predicates(args.gold) File "/home/baks/GSOC/ENV/bin/nlpnet-test.py", line 515, in evaluate_srl_predicates nn = taggers.load_network(md) File "/home/baks/GSOC/ENV/local/lib/python2.7/site-packages/nlpnet/taggers.py", line 38, in load_network nn = net_class.load_from_file(md.paths[md.network]) File "nlpnet/network.pyx", line 858, in nlpnet.network.Network.load_from_file (nlpnet/network.c:14604) File "/home/baks/GSOC/ENV/local/lib/python2.7/site-packages/numpy/lib/npyio.py", line 443, in load "Failed to interpret file %s as a pickle" % repr(file)) IOError: Failed to interpret file 'models/srl-class-predicates.npz' as a pickle

"can't multiply sequence" when SRLTagger

I just run the test code and had that error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/nlpnet/taggers.py", line 205, in __init__
    self._load_data()
  File "/usr/local/lib/python3.5/dist-packages/nlpnet/taggers.py", line 224, in _load_data
    self.boundary_nn = load_network(md_boundary)
  File "/usr/local/lib/python3.5/dist-packages/nlpnet/taggers.py", line 38, in load_network
    nn = net_class.load_from_file(md.paths[md.network])
  File "networkconv.pyx", line 245, in nlpnet.network.ConvolutionalNetwork.load_from_file
  File "networkconv.pyx", line 223, in nlpnet.network.ConvolutionalNetwork._load_from_file
  File "network.pyx", line 258, in nlpnet.network.Network.padding_left.__set__
TypeError: can't multiply sequence by non-int of type 'float'

The test code:


import nlpnet
nlpnet.set_data_dir('/home/srl-pt')
tagger = nlpnet.SRLTagger()
tagger.tag(u'O rato roeu a roupa do rei de Roma.')

SRL not works with some sentences

I installed nlpnet and downloaded data. But it works only with some sentences. I use Ubuntu 13.04 32bits and Python 2.7.4 with virtualenv.

Here I posted two examples, the first seems to work, the second no:

Example 1 (Seem to work):

python nlpnet-tag.py srl /path/to/nlpnet-data/
This is the first sentence of the paragraph. This is the second sentence of the paragraph.
This is the first sentence of the paragraph .
sentence
    A1: the paragraph
    A0: first
    V: sentence

This is the second sentence of the paragraph .
sentence
    A1: the paragraph
    A0: second
    V: sentence

Example 2 (Not works):

This sentence is taked from CoNLL-2005 Examlples

python nlpnet-tag.py srl /path/to/nlpnet-data/
The $1.4 billion robot spacecraft faces a six-year journey to explore Jupiter and its 16 known moons.
The $ 1.4 billion robot spacecraft faces a six-year journey to explore Jupiter and its 16 known moons .

I also tested from python and tokenization works but in the second example calling arg_structures, returns an empty list.

Please let me know if you need something more to address this issue.

Thanks

English models

Hey there, any chance there are models for the English language available, or is this only usable in Portuguese yet?

Cannot import nlpnet - ImportError: cannot import name 'utils'

I converted nlpnet to python 3 using standart 2to3 tool, installed successfuly.
Now try to import, but error:


>>> import nlpnet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/nlpnet/__init__.py", line 3, in <module>
    from . import taggers
  File "/usr/local/lib/python3.4/dist-packages/nlpnet/taggers.py", line 11, in <module>
    from . import utils
ImportError: cannot import name 'utils'

Error POS Training

I using

python nlpnet-train.py pos --gold /home/wannaphong/thainlp/nlpnet/thaipostag.txt

but It' error.

Reading training data...
Traceback (most recent call last):
  File "nlpnet-train.py", line 244, in <module>
    text_reader = create_reader(args, md)
  File "nlpnet-train.py", line 48, in create_reader
    text_reader = pos.POSReader(md, filename=filename)
  File "/usr/local/lib/python2.7/dist-packages/nlpnet/pos/pos_reader.py", line 36, in __init__
    self._read_conll(filename)
  File "/usr/local/lib/python2.7/dist-packages/nlpnet/pos/pos_reader.py", line 84, in _read_conll
    word = fields[ConllPos.word]
IndexError: list index out of range

Data using in POS Training : https://gist.github.com/wannaphongcom/3c366ef6f7f499df1aaa842a8adae04a

If not using POS feature to dependency, error occurred.

taggers.py
def parse_sentence(self, tokens):

    if self.use_pos:
        tokens = self.pos_tagger.tag_tokens(tokens, return_tokens=True)
    #if not using pos. tokens are not tuple.
    for token in tokens:
        if self.use_pos:
            word, pos = token
        else:
            pos = None
        #if not using pos, word is referenced before assignment
        tokens_obj.append(attributes.Token(word, pos=pos)) 

Here is my traceback

PC:2016_NLPNET user$ python bin/nlpnet-tag.py dependency
It was home.
Traceback (most recent call last):
  File "bin/nlpnet-tag.py", line 120, in <module>
    interactive_running(args)
  File "bin/nlpnet-tag.py", line 48, in interactive_running
    result = tagger.tag(text)
  File "/Users/username/anaconda/lib/python2.7/site-packages/nlpnet/taggers.py", line 398, in tag
    return self.parse(text)
  File "/Users/username/anaconda/lib/python2.7/site-packages/nlpnet/taggers.py", line 336, in parse
    parsed = self.parse_sentence(sent)
  File "/Users/username/anaconda/lib/python2.7/site-packages/nlpnet/taggers.py", line 369, in parse_sentence
    tokens_obj.append(attributes.Token(word, pos=pos))
UnboundLocalError: local variable 'word' referenced before assignment

Error on Mac OSX running nlpnet.POSTagger() - AttributeError: 'POSReader' object has no attribute 'word_dict'

Hi,

When running the same script, working on Linux, on my Mac I've got the following error:

command:

nlpnet.set_data_dir('/Users/renatofreitasmartins/Documents/nlpnet-data/')
tagger = nlpnet.POSTagger()

error:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/nlpnet/taggers.py", line 140, in init
self._load_data()
File "/Library/Python/2.7/site-packages/nlpnet/taggers.py", line 254, in _load_data
self.reader.create_converter()
File "/Library/Python/2.7/site-packages/nlpnet/reader.py", line 220, in create_converter
self.converter.add_extractor(self.word_dict.get)
AttributeError: 'POSReader' object has no attribute 'word_dict'

I got another error before regarding the set_data_dir parameter, but it's solved. I have tried even to remove everything and install again, but I think I am missing something.. any idea?

nlpnet giving error when loading own embedding in english language

When loading own embedding using nlpnet-load-embeddings.py, the data get loaded but when i call nlpnet-train.py, i get the following error:

sharad@sharad-Precision-WorkStation-T3500:~/Desktop/Experiments/AE_CNN$ nlpnet-train.py pos --gold test_data.txt --load-features
Reading training data...
Loading vocabulary
Creating new network...
Loading word type features...
Number of types in feature table and dictionary differ.
Generating features for 3 new types.
Traceback (most recent call last):
File "/usr/local/bin/nlpnet-train.py", line 251, in
feature_tables = utils.create_feature_tables(args, md, text_reader)
File "/usr/local/lib/python2.7/dist-packages/nlpnet/utils.py", line 274, in create_feature_tables
num_features = len(types_table[0])
TypeError: object of type 'numpy.float64' has no len()

Thanks

Onde posso encontrar o significado das siglas?

Olá!
Isso não é uma issue mas uma dúvida. Gostaria de saber onde posso encontrar um dicionário para as siglas que são retornadas pelo parser.
Por exemplo: VT = verbo.

Obrigado!

nlpnet POSTagger returns error message when allow_pickle=False

I have installed the latest version of nlpnet library (http://nilc.icmc.usp.br/nlpnet/). Then, when I try to use nlpnet POSTagger according to the follwoing example, I get an error:

import nlpnet
tagger = nlpnet.POSTagger('/path/to/pos-model/', language='pt')

Error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/r/env2/lib/python3.6/site-packages/nlpnet/taggers.py", line 205, in __init__
self._load_data()
File "/home/r/env2/lib/python3.6/site-packages/nlpnet/taggers.py", line 423, in _load_data
self.nn = load_network(md)
File "/home/r/env2/lib/python3.6/site-packages/nlpnet/taggers.py", line 38, in load_network
nn = net_class.load_from_file(md.paths[md.network])
File "nlpnet/network.pyx", line 860, in nlpnet.network.Network.load_from_file (nlpnet/network.c:14631)
File "/home/r/env2/lib/python3.6/site-packages/numpy/lib/npyio.py", line 262, in __getitem__
pickle_kwargs=self.pickle_kwargs)
File "/home/r/env2/lib/python3.6/site-packages/numpy/lib/format.py", line 722, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False

I also tried to install nlpnet again in a different virtual environment, but the error persists. I'm not sure if this is a incompatibility problem, a bug in the lib or an installation issue.

Any suggestions?

training the dependency parser

Hi,

How can we train the dependency parser only?
also the data you have used to train the dependency parser, is that an open datasource ?

Regards,
Debanjan

Error when using pip to install

When using pip it fails to install, if numpy is not availabe

For instance, running

pip install -e .

from a brand new virtualenv fails.

"This version of Mac-Morpho is contained in a single file for training and another for testing..." where could I find?

Hi!

read in the docs that:

 "This version of Mac-Morpho is contained in a single file for training and another for testing, unlike the original distribution. Many errors were corrected and many sentences were discarded, providing a more reliable resource. Also unlike the original, each line contains a sentence, and POS tags are appended to tokens after a "_".

So, I see those files are no longer in the repo, where can I find them?

Thanks and great job in nlpnet!

PS: http://www.nilc.icmc.usp.br/macmorpho/ is offline

error on initial import

I'd really like to try these scripts, but seem to hit a roadblock upfront.

Here is the traceback:

import nlpnet
Traceback (most recent call last):
File "", line 1, in
File "nlpnet/init.py", line 3, in
import taggers
File "nlpnet/taggers.py", line 17, in
from network import Network, ConvolutionalNetwork, LanguageModel
ImportError: No module named network

Here is the full build printout:

Running setup.py install for nlpnet
building 'nlpnet.network' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -I. -I/Users/staker/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c nlpnet/network.c -o build/temp.macosx-10.6-x86_64-2.7/nlpnet/network.o
In file included from nlpnet/network.c:346:
In file included from /Users/staker/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/staker/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /Users/staker/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760:
/Users/staker/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by "
^
1 warning generated.
gcc -bundle -undefined dynamic_lookup -g -arch x86_64 -L/tmp/_py/libraries/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/lib -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.6-x86_64-2.7/nlpnet/network.o -o build/lib.macosx-10.6-x86_64-2.7/nlpnet/network.so
ld: warning: directory not found for option '-L/tmp/_py/libraries/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/lib'
changing mode of build/scripts-2.7/nlpnet-tag.py from 644 to 755
changing mode of build/scripts-2.7/nlpnet-train.py from 644 to 755
changing mode of build/scripts-2.7/nlpnet-test.py from 644 to 755

changing mode of /Users/staker/Library/Enthought/Canopy_64bit/User/bin/nlpnet-tag.py to 755
changing mode of /Users/staker/Library/Enthought/Canopy_64bit/User/bin/nlpnet-test.py to 755
changing mode of /Users/staker/Library/Enthought/Canopy_64bit/User/bin/nlpnet-train.py to 755

Successfully installed nlpnet

Can you help me understand what I might be missing here?

Training new SRL model: Unexpected role data

I am trying to train new SRL model:
root@engine:/var/www/engine/nlpnet-master/bin# nlpnet-train.py srl pred --gold train_google_ru.txt --data srl-model/
with txt file with 2 string, each on new line:

Его уверенная поступь – предмет зависти топ-менеджеров и разработчиков по всему миру.
Для техно-евангелистов Google – это самая крупная жемчужина сокровищницы.

Result of launching is error:


Reading training data...
Traceback (most recent call last):
  File "/usr/local/bin/nlpnet-train.py", line 248, in <module>
    text_reader = create_reader(args, md)
  File "/usr/local/bin/nlpnet-train.py", line 61, in create_reader
    only_predicates=args.predicates)
  File "/usr/local/lib/python3.4/dist-packages/nlpnet/srl/srl_reader.py", line 70, in __init__
    self._read_conll(filename)
  File "/usr/local/lib/python3.4/dist-packages/nlpnet/srl/srl_reader.py", line 130, in _read_conll
    tag, expected_role = self._read_role(tag, 'O', True)
  File "/usr/local/lib/python3.4/dist-packages/nlpnet/srl/srl_reader.py", line 185, in _read_role
    raise ValueError('Unexpected role data: %s' % role)
ValueError: Unexpected role data: по

This error is about strange thing: it cannot understand some words, for example "по" which is in english preposition 'over' (,,, all over the world). If i remove conflicting words it works the following way:

root@engine:/var/www/engine/nlpnet-master/bin# nlpnet-train.py srl pred --gold train_google_ru.txt --data srl-model/

Reading training data...
Loading vocabulary
Creating new network...
Generating word type features...
Created new network with the following layer sizes: 250, 50, 2

Training for up to 1 epochs
1 epochs   Error: 0.000000   Accuracy: 1.000000   0 corrections skipped   learning rate: 0.010000
Finished training

So, what's you advice to solve? How many times i need to train model to achieve good results?

NER with nlpnet

I am executing the first code snippet from https://github.com/attardi/nlpnet. I am facing the following error:

AssertionError: Invalid data Directory.

Whereas I am providing the correct path to the data folder inside which is the \corpora.zip folder. So then why am I getting this error. I want to train nlpnet with my own corporas for Named Entity Recognition.

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.