├── word_embd_cover.PNG ├── LICENSE └── README.md /word_embd_cover.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rabindralamsal/nepali-word2vec/HEAD/word_embd_cover.PNG -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Rabindra Lamsal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Word Embeddings (Word2Vec) for Nepali Language 2 | 3 | ![Word Embeddings for Nepali Language](word_embd_cover.PNG?raw=true) 4 | 5 | This pre-trained Word2Vec model has 300-dimensional vectors for more than 0.5 million Nepali words and phrases. A separate Nepali language text corpus was created using the news contents freely available in the public domain. The text corpus contained more than 90 million running words. 6 | 7 |

Word2Vec Model

8 | 20 | 21 | Download the model from IEEE Dataport: https://ieee-dataport.org/open-access/300-dimensional-word-embeddings-nepali-language 22 | 23 | (Size: 1,881,180,827 bytes and File Type: .txt) 24 | 25 |

Using the Word2Vec model

26 | 27 | ```python 28 | from gensim.models import KeyedVectors 29 | 30 | # Load vectors 31 | model = KeyedVectors.load_word2vec_format(''.../path/to/nepali_embeddings_word2vec.txt', binary=False) 32 | 33 | # find similarity between words 34 | model.similarity('फेसबूक','इन्स्टाग्राम') 35 | 36 | #most similar words 37 | model.most_similar('ठमेल') 38 | 39 | #try some linear algebra maths with Nepali words 40 | model.most_similar(positive=['', ''], negative=[''], topn=1) 41 | ``` 42 | 43 | The design of the Nepali text corpus and the training of the Word2Vec model was done at Database Systems and Artificial Intelligence Lab, School of Computer and System Sciences, Jawaharlal Nehru University, New Delhi. 44 | --------------------------------------------------------------------------------