Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added bangla language. #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pysbd/lang/bangla.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pysbd.abbreviation_replacer import AbbreviationReplacer
from pysbd.lang.common import Common, Standard

class Bangla(Common, Standard):

iso_code = 'bn'

SENTENCE_BOUNDARY_REGEX = r'.*?[।\|!\?]|.*?$'
Punctuations = ['।', '|', '.', '!', '?']

class AbbreviationReplacer(AbbreviationReplacer):
SENTENCE_STARTERS = []
4 changes: 3 additions & 1 deletion pysbd/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from pysbd.lang.deutsch import Deutsch
from pysbd.lang.kazakh import Kazakh
from pysbd.lang.slovak import Slovak
from pysbd.lang.bangla import Bangla

LANGUAGE_CODES = {
'en': English,
Expand All @@ -46,7 +47,8 @@
'ja': Japanese,
'de': Deutsch,
'kk': Kazakh,
'sk': Slovak
'sk': Slovak,
'bn': Bangla
}


Expand Down