ikegami-yukino / sengiri Goto Github PK
View Code? Open in Web Editor NEWYet another sentence-level tokenizer for the Japanese text
License: MIT License
Yet another sentence-level tokenizer for the Japanese text
License: MIT License
When I tried to use the sengiri, and tried to execute the code, The error came out.
$ pip install sengiri
import sengiri
print(sengiri.tokenize('うーん🤔🤔🤔どうしよう'))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In [31], line 1
----> 1 import sengiri
2 print(sengiri.tokenize('うーん🤔🤔🤔どうしよう'))
File ~/anaconda3/lib/python3.9/site-packages/sengiri/__init__.py:2
1 # -*- coding: utf-8 -*-
----> 2 from .sengiri import tokenize
3 """sengiri
4
5 This module provides the Japanese sentence-level tokenizer.
(...)
11 MIT License
12 """
14 VERSION = (0, 2, 1)
File ~/anaconda3/lib/python3.9/site-packages/sengiri/sengiri.py:6
3 import emoji
4 import MeCab
----> 6 EMOJIS = set(emoji.UNICODE_EMOJI.keys())
7 DELIMITERS = set({'。', '.', '…', '・・・', '...', '!',
8 '!', '?', '?', '!?', '?!', '!?', '?!'})
9 re_parenthesis = re.compile('([%s])([\((][^\))]{10,}[\))])' % ''.join(DELIMITERS))
AttributeError: module 'emoji' has no attribute 'UNICODE_EMOJI'
The error message was weird because when I looked at the sengiri.py line 6 the code had already updated to the EMOJI_DATA, not UNICODE_EMOJI.
Hi there! I can't tokenize the sentence, and raised error "ValueError: too many values to unpack (expected 2)"
Im just try this code :
print(sengiri.tokenize('遅刻したけど楽しかったし嬉しかった。すごく充実した!'))
and surface this error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.