Skip to content
Permalink
70bbe1f4b2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@adl13006
Latest commit 70bbe1f Mar 30, 2016 History
Hand tagged the brown dataset for the conjunction approach. My two gloss
approaches seem to be in git hell, will hopefully get to optimize the
jwb edits.
1 contributor

Users who have contributed to this file

26 lines (21 sloc) 624 Bytes
import math
import nltk
from nltk.corpus import wordnet as wn
from nltk.corpus import brown as sc
from collections import Counter
from sets import Set
class cblexicon:
def genSets(self):
f = open('words.txt', 'r+')
content = f.readlines()
positive = Set([])
negative = Set([])
for pair in content:
current = pair.split(' ')
if (current[1][0] == 'p'):
positive.add(current[0])
elif (current[1][0] == 'n'):
negative.add(current[0])
print len(positive)
print len(negative)
cblexicon().genSets()