Skip to content

Commit

Permalink
sdf
Browse files Browse the repository at this point in the history
  • Loading branch information
sbly committed Mar 20, 2013
1 parent fb764d4 commit c8101a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
8 changes: 8 additions & 0 deletions answer
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ sys.path.append("modules")
import questionClassifier
import sourceContentSelector

# basically just the parts of speecn any "important" word would be
key_POS = set(["CD","FW","NN","NNS","NNP","NPS","VB","VBD","VBG","VBN","VBP","VBZ"])
# auxillary verbs we should ignore
aux = set(["is", "was", "did", "does", "do", "were", "are"])

# we should probably change this to the WordNet lemmatizer, but this is ok for now
ps = PorterStemmer()

#entity_names = []
#
#if hasattr(t, 'node') and t.node:
Expand Down
20 changes: 1 addition & 19 deletions modules/lemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ def lem(list):

lemmaList = []

<<<<<<< HEAD
for word,tag in pos:
temp = set({word})

if tag[0] == 'N':
for ss in wn.synsets(word, pos=wn.NOUN):
temp.update(set(lemma.name for lemma in ss.lemmas))
Expand All @@ -25,21 +24,4 @@ def lem(list):
else:
lemmaList.append({word})


return lemmaList


lem(['I','destroyed','the','facility'])


=======
for word in list:
temp = []
for ss in wn.synsets(word):
temp += [lemma.name for lemma in ss.lemmas]
lemmaList.append(temp)

print lemmaList

print wn.synsets("destroy", pos=wn.VERB)
>>>>>>> Revert "Test"

0 comments on commit c8101a9

Please sign in to comment.