Skip to content

Instantly share code, notes, and snippets.

@mohdsanadzakirizvi
Created January 10, 2020 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohdsanadzakirizvi/963994f203f7761f1b39e868e77564f7 to your computer and use it in GitHub Desktop.
Save mohdsanadzakirizvi/963994f203f7761f1b39e868e77564f7 to your computer and use it in GitHub Desktop.
from indicnlp.tokenize import sentence_tokenize
indic_string="""तो क्या विश्व कप 2019 में मैच का बॉस टॉस है? यानी मैच में हार-जीत में \
टॉस की भूमिका अहम है? आप ऐसा सोच सकते हैं। विश्वकप के अपने-अपने पहले मैच में बुरी तरह हारने वाली एशिया की दो टीमों \
पाकिस्तान और श्रीलंका के कप्तान ने हालांकि अपने हार के पीछे टॉस की दलील तो नहीं दी, लेकिन यह जरूर कहा था कि वह एक अहम टॉस हार गए थे।"""
# Split the sentence, language code "hi" is passed for hingi
sentences=sentence_tokenize.sentence_split(indic_string, lang='hi')
# print the sentences
for t in sentences:
print(t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment