this doesnt work when the file is in the same directory as the .py file.
def get_colocations(filename):
sentences = open(filename).read().split("\n")
colocations = []
for sent in sentences:
colocations.append(sent)
return colocations
def main():
get_colocations("colocations.txt")
print "Colocations are",colocations
Can anyone help????????