Skip to main content

oseti

circleci coveralls.io pyversion latest version license

Dictionary based Sentiment Analysis for Japanese

INSTALLATION

$ pip install oseti

USAGE

import oseti

analyzer = oseti.Analyzer()
analyzer.analyze('天国で待ってる。')
# => [1.0]
analyzer.analyze('遅刻したけど楽しかったし嬉しかった。すごく充実した!')
# => [0.3333333333333333, 1.0]

analyzer.count_polarity('遅刻したけど楽しかったし嬉しかった。すごく充実した!')
# => [{'positive': 2, 'negative': 1}, {'positive': 1, 'negative': 0}])
analyzer.count_polarity('そこにはいつもと変わらない日常があった。')
# => [{'positive': 0, 'negative': 0}]

analyzer.analyze_detail('お金も希望もない!')
# => [{'positive': [], 'negative': ['お金-NEGATION', '希望-NEGATION'], 'score': -1.0}])
analyzer.analyze_detail('お金がないわけではない')
# => [{'positive': ['お金'], 'negative': [], 'score': 1.0}]

ACKNOWLEDGEMENT

This module uses 日本語評価極性辞書(用言編)ver.1.0 and 日本語評価極性辞書(名詞編)ver.1.0

  • 小林のぞみ,乾健太郎,松本裕治,立石健二,福島俊一. 意見抽出のための評価表現の収集. 自然言語処理,Vol.12, No.3, pp.203-222, 2005. / Nozomi Kobayashi, Kentaro Inui, Yuji Matsumoto, Kenji Tateishi. Collecting Evaluative Expressions for Opinion Extraction, Journal of Natural Language Processing 12(3), 203-222, 2005.

  • 東山昌彦, 乾健太郎, 松本裕治, 述語の選択選好性に着目した名詞評価極性の獲得, 言語処理学会第14回年次大会論文集, pp.584-587, 2008. / Masahiko Higashiyama, Kentaro Inui, Yuji Matsumoto. Learning Sentiment of Nouns from Selectional Preferences of Verbs and Adjectives, Proceedings of the 14th Annual Meeting of the Association for Natural Language Processing, pp.584-587, 2008.

CHANGES

0.3 (2022-08-10)

  • Improve dictionaries

  • Use Bunkai module istead of sengiri

0.2 (2019-10-07)

  • Add new methods count_polarity (thanks @yskn67) and analyze_detail

  • Drop support Python 3.3

  • Use sengiri package

  • Support parallel negation (e.g. お金も希望もない is negative)

  • Support “arujanai” expression (e.g. お金があるじゃない is positive)

0.1.2 (2019-02-18)

  • Fix missing CHANGES.rst

0.1.1 (2019-02-13)

  • Set install_requires

0.1 (2019-02-12)

  • First release

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oseti-0.3.tar.gz (74.1 kB view details)

Uploaded Source

File details

Details for the file oseti-0.3.tar.gz.

File metadata

  • Download URL: oseti-0.3.tar.gz
  • Upload date:
  • Size: 74.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for oseti-0.3.tar.gz
Algorithm Hash digest
SHA256 dc3837ee356209692a50f49f60a676402bba10b129f46e42fc1fae6d74e183f4
MD5 3cfc54727ec8afc3761034fc026b3258
BLAKE2b-256 7eca010f6415910682a8511d13e186c773c092e28de8dd2b7536afe1cb7cdeac

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.3.1

2 files

0.4.3

2 files

0.4.2

1 file

0.4.1

1 file

0.4

1 file

0.3.1

1 file

This release

0.3 This release

1 file

0.2

1 file

0.1.2

1 file

0.1.1

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page