Last active
January 25, 2021 14:54
-
-
Save LowriWilliams/860eb59bdca6bebc67de0424eec2804e to your computer and use it in GitHub Desktop.
wn/meronyms.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 41, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[Synset('burl.n.02'), Synset('crown.n.07'), Synset('limb.n.02'), Synset('stump.n.01'), Synset('trunk.n.01')]\n", | |
"\n", | |
"\n", | |
"[Synset('heartwood.n.01'), Synset('sapwood.n.01')]\n" | |
] | |
} | |
], | |
"source": [ | |
"tree = wn.synset('tree.n.01')\n", | |
" \n", | |
"print(tree.part_meronyms())\n", | |
"print('\\n')\n", | |
"print(tree.substance_meronyms())" | |
] | |
} | |
], | |
"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