Skip to content

Instantly share code, notes, and snippets.

@LowriWilliams
Created January 25, 2021 14:56
Show Gist options
  • Save LowriWilliams/92ad31ba395df1dd4ffe6fbfd6b1c777 to your computer and use it in GitHub Desktop.
Save LowriWilliams/92ad31ba395df1dd4ffe6fbfd6b1c777 to your computer and use it in GitHub Desktop.
wn/holonyms.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Synset('chemical_element.n.01'), Synset('molecule.n.01')]\n",
"\n",
"\n",
"[Synset('water.n.01')]\n"
]
}
],
"source": [
"print(wn.synset('atom.n.01').part_holonyms())\n",
"print('\\n')\n",
"print(wn.synset('hydrogen.n.01').substance_holonyms())"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment