Skip to content

Instantly share code, notes, and snippets.

View Apollo2X's full-sized avatar

Alex Apollo2X

  • Grand Rapids, MI
View GitHub Profile
@DJSagarAhire
DJSagarAhire / SWNReader.py
Last active February 5, 2017 12:44
A short utility to read SentiWordNet made in Python.
import sys
def split_line(line):
cols = line.split("\t")
return cols
def get_words(cols):
words_ids = cols[4].split(" ")
words = [w.split("#")[0] for w in words_ids]
return words