how to look up a word if a certain word exists write a dictionary :     I have a .txt file looks like this
    [enter image description here][1]
    
    
      [1]: https://i.stack.imgur.com/WtyjV.png
    
    As you can see its a several relationships between the verbs (dont care about the numbers) the file has 5,000 lines. 
    
    what I want is a dict for each relationship, so that we could say for example
    
    similar-to['anger'] = 'energize' 
    happens-before['X'] = 'Y'
    stronger-than ['A'] = 'B' and so on.
    
    So What I have so far is working perfectly for only [stronger-than] relationship. how should I extend it in a way that does all other relationships as well? 
    
    
    
    
    import csv
    
    file = open("C:\\Users\\shide\\Desktop\\Independent study\\data.txt")
    counter = 1
    stronger = {}
    strongerverb = []
    secondverb = []
    term1 = "[stronger-than]" #Look for stronger-than
         words = line.split()  #split sentence
        if term1 in words:  #if ['Stronger-than'] exists in the line then add the first word
         strongerverb.append(line.split(None, 1)[0]) # add only first verb
         secondverb.append(line.split()[2])  #add second verb
    
         if term1 in words:  # if ['Stronger-than'] exists in the line then add the first word
             strongerverb.append(line.split(None, 1)[0])  # add only first verb
             secondverb.append(line.split()[2])  # add second verb
    
    capacity = len(strongerverb)
    
    index = 0
    while index!=capacity:
        line = strongerverb[index]
        for word in line.split():
      #      print(word)
            index = index+1
    #print("First verb:",firstverb)
    #print("Second verb:",secondverb)
    for i in range(len(strongerverb)):
        stronger[strongerverb[i]] = secondverb[i]
    
    #Write a CSV file that fist coloum is containing verbs that is stronger than the second coloum.
    
    with open('output.csv', 'w') as output:
         writer = csv.writer(output, lineterminator='\n')
         for secondverb, strongerverb in stronger.items():
            writer.writerow([strongerverb, secondverb])


One way is to do same way for all other relationships but I guess that would not be a smart thing. Any ideas? 
what I want is a dict for each relationship, so that we could say:
   
    similar-to['anger'] = 'energize' 
    happens-before['X'] = 'Y'
    stronger-than ['A'] = 'B'
 I am new to python and any help would be greatly appreciated. 
