Skip to content

Instantly share code, notes, and snippets.

@NesrineSF
Created March 30, 2021 21:09
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/267ff34b6c7fd61df0e79f70c22ef46e to your computer and use it in GitHub Desktop.
Save NesrineSF/267ff34b6c7fd61df0e79f70c22ef46e to your computer and use it in GitHub Desktop.
tokenization to get the atom level of the sentence
for token in output.tokens:
print (f'{text[token.start:token.end]:{20}}')
#we iterate on the tokens array to subdivise the compound words into the atom level
for atom in token.atoms:
print (f'\t atom:{text[atom.start:atom.end]:{20}}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment