MontyLingua should be installed in ***\Python25\Lib\site-packages\ This path should be included also in PATH system variable. IDLE 1.2 >>> import sys >>> MLdir = r'c:\Python25\Lib\site-packages\MontyLingua-2.1\Python' >>> sys.path.append(MLdir) a = """ This paper examines the characteristics of middle class Tehranis' networks, based upon a survey of 318 individuals from the 159 households. The results show that women and men have similar-size networks. However, their networks differ substantially in gender composition, with each having almost two-thirds of network members of their own gender. Men's and women's networks contain a large proportion of kin overall. Most ties tend to be with immediate kin: children, parents and siblings. An immediate kin is usually the socially closest member of a network. Apart from voluntary factors, the importance of kinship ties in men's and women's networks may be the result of the macro-structural conditions under which patterns of social relationships take place. (c) 2007 Published by Elsevier B.V. """ >>> a = """ This paper examines the characteristics of middle class Tehranis' networks, based upon a survey of 318 individuals from the 159 ... relationships take place. (c) 2007 Published by Elsevier B.V. """ >>> from MontyLingua import * >>> ML = MontyLingua() >>> a2token = [ML.tokenize(st) for st in ML.split_sentences(a.lower())] >>> token2tagged = [ML.tag_tokenized(t) for t in a2token] >>> lem = [ML.lemmatise_tagged(t) for t in token2tagged] >>> import string >>> lemas = [s.split('/')[2] for s in string.join(lem).split(' ')] >>> stopwords = open(wdir+'\\StopWords.dat', 'r').read().lower().split() >>> lemlist = filter(lambda s: s not in stopwords, lemas) >>> sw2 = ['.',',',';','(',')','[',']','"','=','?','!',':','-','s',''] >>> lemlist2 = filter(lambda s: s not in sw2, lemlist) >>> final = list(set(lemlist2)) >>> final.sort() >>> ic = a.lower().rfind("(c)") >>> if ic > 0: ab = a[:ic] >>> wdir = r'd:\vlado\work\Python\WoS'; sys.path.append(wdir) >>> import WoS2Pajek >>> WoS2Pajek.run(wdir,MLdir,'SocNet','SocNet.WoS',20000,False,100)