Last active
August 29, 2015 14:17
-
-
Save kmike/d0f79f38180591aaf227 to your computer and use it in GitHub Desktop.
переходность причастий
This file contains hidden or 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": [{"execution_count": 4, "source": "from pymorphy2 import MorphAnalyzer\nfrom pymorphy2.utils import with_progress", "metadata": {"trusted": true, "collapsed": true}, "cell_type": "code", "outputs": []}, {"execution_count": 5, "source": "m = MorphAnalyzer()", "metadata": {"trusted": true, "collapsed": true}, "cell_type": "code", "outputs": []}, {"execution_count": 17, "source": "passive_participles = [p for p in with_progress(m.iter_known_word_parses()) if {'PRTF', 'pssv'} in p.tag]\nactive_participles = [p for p in with_progress(m.iter_known_word_parses()) if {'PRTF', 'actv'} in p.tag]", "metadata": {"trusted": true, "collapsed": false}, "cell_type": "code", "outputs": [{"output_type": "stream", "name": "stdout", "text": "5096128 [elapsed: 00:35, 144820.54 iters/sec]\n5096128 [elapsed: 00:37, 137519.73 iters/sec]\n"}]}, {"execution_count": 18, "source": "len(passive_participles), len(active_participles)", "metadata": {"trusted": true, "collapsed": false}, "cell_type": "code", "outputs": [{"output_type": "execute_result", "execution_count": 18, "data": {"text/plain": "(466062, 1329852)"}, "metadata": {}}]}, {"execution_count": 19, "source": "pssv_intr = [p for p in passive_participles if 'intr' in p.tag]\npssv_tran = [p for p in passive_participles if 'tran' in p.tag]\n\nactv_intr = [p for p in active_participles if 'intr' in p.tag]\nactv_tran = [p for p in active_participles if 'tran' in p.tag]", "metadata": {"trusted": true, "collapsed": false}, "cell_type": "code", "outputs": []}, {"execution_count": 20, "source": "len(pssv_intr), len(pssv_tran), len(actv_intr), len(actv_tran)", "metadata": {"trusted": true, "collapsed": false}, "cell_type": "code", "outputs": [{"output_type": "execute_result", "execution_count": 20, "data": {"text/plain": "(0, 466062, 708712, 621140)"}, "metadata": {}}]}, {"execution_count": null, "source": "", "metadata": {"trusted": true, "collapsed": true}, "cell_type": "code", "outputs": []}], "nbformat": 4, "nbformat_minor": 0, "metadata": {"kernelspec": {"language": "python", "name": "python3", "display_name": "Python 3"}, "language_info": {"name": "python", "codemirror_mode": {"name": "ipython", "version": 3}, "pygments_lexer": "ipython3", "nbconvert_exporter": "python", "file_extension": ".py", "mimetype": "text/x-python", "version": "3.4.2"}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment