Skip to main content

A BERT-based text sentiment classification pipeline for Nepali

Project description

nephased

[!Warning] This section contains vulgar words

Nephased provides a BERT-based classification pipeline for detecting Nepali text sentiment

Installation

From TestPyPI:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nephased

Usage

Import Nephased module using the following command.

from nephased import Nephased

Initialize Nephased

clf = Nephased()
  • You can pass a single string:
>>> clf.predict("थुक्क पैसा मा बिकने हीजडा")
'PROFANITY_0'
  • or, a list of string:
>>> clf.predict(["राडिको छोरोको शासन धेर दिन टिक्दैन |", "सुरु मा चाहिँ तैले यो देश छोडनु पर्यो |", "एसको घरमा आगो लाहिदे ।"])
['PROFANITY_1', 'GENERAL', 'VIOLENCE']

About Output

Nephased can distinguish between 4 categories:

  • GENERAL : Instance without any profanity or violence.
  • PROFANITY_0 : Instance including rude, bad or slander which are not very harsh but offensive words used on day-to-day lives in Nepal.
  • PROFANITY_1 : Instance including swear or curse words which are very harsh
  • VIOLENCE : Instance including physical assualt or rape and pyromaniac act.

The guidelines for segragating such sentiments are on NepsaGuidelines

[!NOTE] Nephased is trained on NepSa dataset

Project details


Download files

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

Source Distribution

nephased-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nephased-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file nephased-0.0.2.tar.gz.

File metadata

  • Download URL: nephased-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for nephased-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b08593d2defe196a5638d2560856ebe3c62607bbce634c91d97808471433abed
MD5 d6c3eb8174630a7b3d5130752524f63d
BLAKE2b-256 80cd26c44c7e6ca952b9783e26e7eefdcd38031136f55aef8c4d2eb54205ab12

See more details on using hashes here.

File details

Details for the file nephased-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: nephased-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for nephased-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 029fff938e06cf6ab2a53a18e8973d170b9075ada55c1fe8347c8752bcf6e9f1
MD5 f3c481d886a01115c33e4eebd95ba57d
BLAKE2b-256 6f9dfedee6279388129ecca65b302ee5e4b32f035bb13256673e8d6676f0df33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page