Skip to content

Commit

Permalink
Akshara treats anuswaara properly
Browse files Browse the repository at this point in the history
  • Loading branch information
arindamsaha1507 committed Nov 25, 2024
1 parent a6a14f8 commit fc7a663
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,4 @@ pyrightconfig.json
# End of https://www.toptal.com/developers/gitignore/api/python

.vscode/
temp.py
6 changes: 6 additions & 0 deletions akshara/varnakaarya.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ def get_akshara(word: str) -> list:
i for i, x in enumerate(vinyaasa) if x in vn.svara or x in vn.anunaasika_svara
]

index_copy = index_svara.copy()

for ii, index in enumerate(index_copy):
if index + 1 < len(vinyaasa) and vinyaasa[index + 1] == "ं":
index_svara[ii] = index + 1

akshara = []
start = 0
for i in index_svara:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="akshara",
version="1.1.2",
version="1.1.3",
author="Arindam Saha",
author_email="arindamsaha1507@gmail.com",
url="https://github.com/arindamsaha1507/akshara",
Expand Down

0 comments on commit fc7a663

Please sign in to comment.