taishi-i / nagisa

A Japanese tokenizer based on recurrent neural networks
https://huggingface.co/spaces/taishi-i/nagisa-demo
MIT License
379 stars 22 forks source link

Dynet38 is not compatible with python3.11 on macos m2 #35

Closed BarnabasSzabolcs closed 2 months ago

BarnabasSzabolcs commented 3 months ago

Hi Taishi-i,

I know you have been battling with dynet not having the proper wheel for some python versions... unfortunately, I cannot install nagisa on MacOS Sonoma 14.3.1 (23D60), with python3.11.

I got the following error using pip-sync:

ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement DyNet38 (from nagisa) (from versions: none)

taishi-i commented 3 months ago

Hi @BarnabasSzabolcs. Thank you for sending the error report and for trying to use nagisa. I apologize for any inconvenience caused. As discussed in this issue, nagisa cannot be used on Mac computers with the M1 or M2 chip. I am working on improvements to resolve this issue, but as I do not yet have a timeline for providing a Mac wheel, please refer to this as a workaround. I'm sorry.

taishi-i commented 2 months ago

Hi @BarnabasSzabolcs. Thank you for your patience. Nagisa is now available on MacOS M1/2. It is compatible with Python versions 3.9 to 3.12.

Please install nagisa using the following command.

pip install nagisa

Here is the basic usage.

import nagisa

text = 'Pythonで簡単に使えるツールです'
words = nagisa.tagging(text)
print(words)
#=> Python/名詞 で/助詞 簡単/形状詞 に/助動詞 使える/動詞 ツール/名詞 です/助動詞

# Get a list of words
print(words.words)
#=> ['Python', 'で', '簡単', 'に', '使える', 'ツール', 'です']

# Get a list of POS-tags
print(words.postags)
#=> ['名詞', '助詞', '形状詞', '助動詞', '動詞', '名詞', '助動詞']

If you encounter any installation errors, please comment again. I apologize for any inconvenience caused. Thank you for considering the use of nagisa.I hope this tool will be useful to you.

BarnabasSzabolcs commented 2 months ago

Thank you, @taishi-i !

taishi-i commented 2 months ago

This issue has been resolved, so I will close it. If you are unable to install, please reopen the issue and add a comment. Thank you!