Skip to main content

Performs Classification using Regex for social media user's profile categorization and NER tasks

Project description

NLP Classification Python Package For Profile Category and NER

Functionality of the Package

Performs Classification using Regex for social media user's profile categorization and NER tasks

  1. If profile:
    • Categories: Politician, Information Vehicule, Health Professional, Science, Education Professional, Artist, Organization and Journalist;
  2. NER:
    • Vaccines, Products, Drugs, Diseases, Symptoms, Science, Part of the body; returns a dataframe that has information of the entity id, name and it's occurence frequency on the input text.

The package takes the following parameters as input:

  1. Profile:
    • Text containing informations about the user's biography or channel description in the context of communication reaseach porpuses
  2. NER:
    • Text

Usage

pip install ProfileNER-classifier

Example

from nlpclassifier_profilener import NLPClassifier

#instatiate the classifier
tpc = TwitterProfileClassifier('profile')
#preprocess the text. Its's important to lowercase and remove accents
yt['channelDesc'] = yt['channelDesc'].apply(lambda x: pipeline.preprocess(x, lower = True)).apply(lambda x: pipeline.strip_accents(x))
#classify channelCategory
yt['channelCategory'] = yt['channelDesc'].apply(lambda x: tpc.classifier(str(x)))

yt['channelCategory'].value_counts()

Note

The package is currently in a very elementary stage and work is in progress. In case of error, feel free to contact me.

Change Log

0.0.2 (03/09/2022)

  • First Release

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

ProfileNER-classifier-0.0.2.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

ProfileNER_classifier-0.0.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file ProfileNER-classifier-0.0.2.tar.gz.

File metadata

  • Download URL: ProfileNER-classifier-0.0.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for ProfileNER-classifier-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5bec5b4bd9765f6aba176dac05269ae1a4f588a2573a4add6e5512fe9ce9ac8e
MD5 33ebfe614dbae3ac66b9b06a1c41b6fe
BLAKE2b-256 09f2311c0e8a5eac5e6467b038f47c8e4340517c4d08649f1681beb47b9a0996

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ProfileNER_classifier-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 773c700e0eba8db3ae0dc85224ce209ca01e01a7b29ec668630655121f95cf3a
MD5 655f787c10aac03ce803e4d2ae4a98db
BLAKE2b-256 3305e21743a19d0b064f1edef9455b91d0c3acfbe2d0b8a3ad8bc87945d418a4

See more details on using hashes here.

Supported by

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