Skip to content

Instantly share code, notes, and snippets.

@stevenbedrick
Created June 26, 2015 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenbedrick/0a4fbbcb779783bfc791 to your computer and use it in GitHub Desktop.
Save stevenbedrick/0a4fbbcb779783bfc791 to your computer and use it in GitHub Desktop.
>>> for (s1, s2) in product(wordnet.synsets("OCTOPUS"), wordnet.synsets("SQUID")):
... print(s1)
... print(s2)
... print(wordnet.jcn_similarity(s1,s2,ic))
...
...
Synset('octopus.n.01')
Synset('squid.n.01')
5e-301
Synset('octopus.n.01')
Synset('squid.n.02')
5e-301
Synset('octopus.n.02')
Synset('squid.n.01')
5e-301
Synset('octopus.n.02')
Synset('squid.n.02')
1e+300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment