Skip to content

Instantly share code, notes, and snippets.

@NesrineSF
Created March 30, 2021 20:11
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 NesrineSF/b69030abbb5aeae64eef36860c2a9e7b to your computer and use it in GitHub Desktop.
Save NesrineSF/b69030abbb5aeae64eef36860c2a9e7b to your computer and use it in GitHub Desktop.
Subdivision of the text into phrases
#we use the element output.phrases to subdivise the text into phrases
#start and end are the positions of the phrase in the analyzed text
for phrase in output.phrases:
print (f'Phrases:{text[phrase.start:phrase.end]:{20}}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment