https://github.com/publishername/nepalithar
This is a simple Nepali Thar package. This package can be used to generate list of Nepali surnames and detect them.
https://github.com/publishername/nepalithar
Last synced: about 1 year ago
JSON representation
This is a simple Nepali Thar package. This package can be used to generate list of Nepali surnames and detect them.
- Host: GitHub
- URL: https://github.com/publishername/nepalithar
- Owner: PublisherName
- License: mit
- Created: 2021-05-30T16:15:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-22T08:14:25.000Z (over 3 years ago)
- Last Synced: 2025-03-07T21:48:46.283Z (over 1 year ago)
- Language: Python
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nepali Thar
This is a simple Nepali Thar package. This package can be used to generate list of Nepali surnames and detect them.
## Features:
- Split name based on surname.
- Detects the position of Nepali Surname in a text.
- Checks if the words is Nepali Surname or not.
- Gives a list of Nepali Surname's.
## How to Import
>>> pip install nepalithar
>>> import nepalithar
>>> thar = nepalithar.Caste()
## Check Nepali Surname
>> thar.is_true("Rajesh")
False
>>> thar.is_true("Hamal")
True
## Get Random n number of Surname
>> thar.get(3)
['Kutal', 'Shrestha', 'Rapacha']
## Get Position of Surname in a text
>> thar.get_position("Rajesh Hamal Madhu Bhattarai")
[1, 3]
## Detect Position along with surname
>> thar.detect('Rajesh Hamal Madhu Bhattarai')
[(1, 'Hamal'), (3, 'Bhattarai')]
## Split a group of name based on surname
>> thar.split_name("Rajesh Hamal Madhu Bhattarai")
['Rajesh Hamal', 'Madhu Bhattarai']
## References:
- Nepali Thar Dataset : https://github.com/amitness/thar
## Others:
- Note: Package created during COVID-19 quarantine out-of-boredom.