nepali_embedding
Generate text embedding for nepali text
Objective
Any NLP downstream tasks such as text classification, Named Entity Recognition performed on nepali textual data requires embedding of the words as the feature embedding matrix. For english text, there are several ways we can generate embedding such as Word2Vec, Glove, BERT and so on from several open source NLP libraries. However, there seems to be no open source library for such tasks in nepali text. We aim to provide accurate word embedding for nepali text through several NLP based architectures so that it can be used in further NLP downstream tasks in nepali language.
Models used overview
We have developed state of the art models for embedding generation for nepali text.
- Sabda2Vec
- Bakya2Vec
- NepBERT
Usage
Word_embedding
Use this script to get embedding of a word (sabda).
from nepali_embedding.sabda2vec.inference import Sabda2Vec
sabda2vec_obj = Sabda2Vec(model_name = "sabda2vec_sm")
#Get embedding of the token
embedding = sabda2vec_obj.get_embedding("हार")
# Get top similar tokens
top_similar = sabda2vec_obj.get_most_similar("हार",5)
# Get similarity between two tokens
similarity_score = sabda2vec_obj.get_similarity_between_tokens("हार","पराजय")
sabda_to_vec_model: https://www.dropbox.com/s/xkd29spkozoavhk/sabda_to_vec_model?dl=0
sabda_to_vec_model_md: https://www.dropbox.com/s/55m5q4h5ys1l4np/sabda_to_vec_model_md?dl=0
Loading embedding from nepBERT model
from nepali_embedding.nepBERT.embedding_generator import NepBERT
nepbert = NepBERT()
test_sentence = 'आकाश भाई ज्ञानी मन्छे हो'
embedding = nepbert.get_bert_embedding_sentence(test_sentence,)
Metadata
Release files for nepali-embedding 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nepali_embedding-0.1.tar.gz | 10.3 kB | Without provenance | Details for nepali_embedding-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nepali_embedding-0.1-py3-none-any.whl | Python 3 | none | any | Details for nepali_embedding-0.1-py3-none-any.whl |
Total release size: 24.2 kB
Release files / nepali_embedding-0.1.tar.gz
| Download URL | nepali_embedding-0.1.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e6f1dae97656040531d6ba0000c3c0dbea6f023f74d9d4e40057d4de6f0a620
|
|
BLAKE2b-256 checksum How to use checksums |
d5cd74b782585ff9d46e3cdd6c26eab0b95b1aa36d44808d0f48794998418f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9
|
Release files / nepali_embedding-0.1-py3-none-any.whl
| Download URL | nepali_embedding-0.1-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7d7afe59be8f0adcd1b3b22996c86fb15797209165c7ea3955e63bc790746dd
|
|
BLAKE2b-256 checksum How to use checksums |
539d2f5507be049a614a91e5fa22d23a84edf71d8a9e51529cad9a04ef052115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9
|
Security for nepali-embedding 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.