Skip to content

Instantly share code, notes, and snippets.

@cigrainger
Created April 17, 2014 17:19
Show Gist options
  • Select an option

  • Save cigrainger/10999211 to your computer and use it in GitHub Desktop.

Select an option

Save cigrainger/10999211 to your computer and use it in GitHub Desktop.
with open('/Users/cigrainger/AeroFS/techproximity/shortabstracts.txt','rb') as f:
with open('/Users/cigrainger/AeroFS/techproximity/lemma.txt','w') as f2:
f2.truncate()
for line in f:
a = line.replace('\r\n','')
c = a.split(' ')
b = []
for i in c:
b.append(lmtzr.lemmatize(i))
a = ' '.join(b)
f2.write(a + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment