This is a simple Nepali Thar package. This package can be used to generate list of Nepali surnames and detect them.
- 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.
>>> pip install nepalithar
>>> import nepalithar
>>> thar = nepalithar.Caste()
>> thar.is_true("Rajesh")
False
>>> thar.is_true("Hamal")
True
>> thar.get(3)
['Kutal', 'Shrestha', 'Rapacha']
>> thar.get_position("Rajesh Hamal Madhu Bhattarai")
[1, 3]
>> thar.detect('Rajesh Hamal Madhu Bhattarai')
[(1, 'Hamal'), (3, 'Bhattarai')]
>> thar.split_name("Rajesh Hamal Madhu Bhattarai")
['Rajesh Hamal', 'Madhu Bhattarai']
- Nepali Thar Dataset : https://github.com/amitness/thar
- Note: Package created during COVID-19 quarantine out-of-boredom.