Code:
import collections
for line in open('data.txt'):
parts = line.split('\n')[0].split(' {')[1].split('|')
counter = collections.Counter()
for part in parts:
words = part.split(' ')
for i in range(1, len(words)+1):
counter[tuple(words[:i])] +=1
most_common = [words for words, count in counter.most_common(10) if count == counter.most_common(1)[0][1]]
root_keyword = ' '.join(sorted(most_common, key=len)[-1])