Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created September 2, 2022 20:58
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 quantra-go-algo/8b3201e64dd2684c9db7c24edd06e8e1 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/8b3201e64dd2684c9db7c24edd06e8e1 to your computer and use it in GitHub Desktop.
import pandas as pd
token_pos = []
for token in token_without_punc:
token_pos.append([token.text, token.lemma_, token.pos_, token.tag_, token.dep_,
token.shape_, token.is_alpha, token.is_stop])
df = pd.DataFrame(token_pos, columns=['Text', 'Lemma', 'POS', 'Tag',
'Syntactic dependency relation', 'Shape', 'Is Alphabet', 'Is stop word'])
df
@Nikhilml99
Copy link

python pos_tagging.py

@quantra-go-algo
Copy link
Author

Hi Nikhil,

We hope that you found the code helpful. Please do let us know in case you have any queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment