Created
March 30, 2021 21:09
-
-
Save NesrineSF/267ff34b6c7fd61df0e79f70c22ef46e to your computer and use it in GitHub Desktop.
tokenization to get the atom level of the sentence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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