@@ -0,0 +1,1027 @@
+#!/usr/bin/env python3%0A%0Aimport requests%0Aimport sys%0A%0A# Run %60./conceptnet.py banana%60 to search words related to banana.%0A%0Aapi='http://conceptnet5.media.mit.edu/data/5.2/search'%0A%0Adef otherWord(word,edge):%0A    if edge%5B'startLemmas'%5D == word:%0A        return edge%5B'endLemmas'%5D%0A    return edge%5B'startLemmas'%5D%0A%0Adef associatedWordsRelation(word,relation):%0A    %22%22%22%0A        Return words related to the given word by the given relations.%0A    %22%22%22%0A    r = requests.get(api,params=%7B'text':word,'limit':10,'rel':relation%7D).json()%0A    return %5BotherWord(word,w) for w in r%5B'edges'%5D if w%5B'score'%5D/r%5B'maxScore'%5D%3E=0.5%5D%0A%0Adef associatedWords(word,relations):%0A    %22%22%22%0A        Return words related to the given word by one of the given relations.%0A    %22%22%22%0A    l=%5B%5D%0A    for r in relations:%0A        l.extend(associatedWordsRelation(word,r))%0A    return set(l)%0A%0Aif __name__ == %22__main__%22:%0A    if len(sys.argv) != 2:%0A        sys.exit(%22Syntax: ./%25s %3Cword to search%3E%22 %25 sys.argv%5B0%5D)%0A    print(associatedWords(sys.argv%5B1%5D,%7B'/r/RelatedTo','/r/IsA','/r/causes'%7D))%0A

Add a demo file for conceptnet.