Skip to content

Instantly share code, notes, and snippets.

@cxtadment
Created April 18, 2016 00:10
Show Gist options
  • Save cxtadment/0ad3b6bb79f2896e95e579cde1b4c929 to your computer and use it in GitHub Desktop.
Save cxtadment/0ad3b6bb79f2896e95e579cde1b4c929 to your computer and use it in GitHub Desktop.
def pos_tagging(self, microblog_text):
words_taggings = pseg.cut(microblog_text)
words, taggings = [], []
for word, tagging in words_taggings:
if self.seg_filter(word, tagging):
words.append(word)
taggings.append(tagging)
return words, taggings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment