From 4f7e85c89a0d3f3fdaa584eda5d80343108ffd24 Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Wed, 18 Jan 2023 21:30:01 -0700 Subject: [PATCH] a --- lattices.ipynb | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/lattices.ipynb b/lattices.ipynb index 8ade96c..b16e4f6 100644 --- a/lattices.ipynb +++ b/lattices.ipynb @@ -29,7 +29,7 @@ }, { "cell_type": "code", - "execution_count": 114, + "execution_count": 119, "metadata": {}, "outputs": [], "source": [ @@ -52,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 115, + "execution_count": 120, "metadata": {}, "outputs": [ { @@ -62,7 +62,7 @@ "" ] }, - "execution_count": 115, + "execution_count": 120, "metadata": {}, "output_type": "execute_result" } @@ -109,7 +109,7 @@ }, { "cell_type": "code", - "execution_count": 116, + "execution_count": 121, "metadata": {}, "outputs": [ { @@ -161,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 117, + "execution_count": 122, "metadata": {}, "outputs": [ { @@ -228,7 +228,7 @@ }, { "cell_type": "code", - "execution_count": 118, + "execution_count": 123, "metadata": {}, "outputs": [ { @@ -237,6 +237,9 @@ "text": [ "The lattice top element, every word has every tag:\n", "Start size = 32\n", + "Calling with noun_immediately_precedes_verb\n", + "noun_immediately_precedes_verb removed 0 elements\n", + "set()\n", "Calling with remove_noun_nodoubles\n", "remove_noun_nodoubles removed 0 elements\n", "set()\n", @@ -275,26 +278,26 @@ " ('the', 'NOUN(OBJ)'),\n", " ('the', 'NOUN(SUBJECT)'),\n", " ('the', 'VERB')}\n", + "Calling with noun_immediately_precedes_verb\n", + "noun_immediately_precedes_verb removed 2 elements\n", + "{('fox', 'VERB'), ('fox', 'DET')}\n", "Calling with remove_noun_nodoubles\n", - "remove_noun_nodoubles removed 0 elements\n", - "set()\n", + "remove_noun_nodoubles removed 2 elements\n", + "{('brown', 'NOUN(SUBJECT)'), ('brown', 'NOUN(OBJ)')}\n", "Calling with remove_det_nonoun\n", "remove_det_nonoun removed 1 elements\n", - "{('fox', 'DET')}\n", + "{('quick', 'DET')}\n", "Calling with jumps_is_verb\n", "jumps_is_verb removed 0 elements\n", "set()\n", - "Iteration 1 size = 27\n", + "Iteration 1 size = 23\n", "{('brown', 'DET'),\n", - " ('brown', 'NOUN(OBJ)'),\n", - " ('brown', 'NOUN(SUBJECT)'),\n", " ('brown', 'VERB'),\n", " ('dog', 'NOUN(OBJ)'),\n", " ('dog', 'NOUN(SUBJECT)'),\n", " ('dog', 'VERB'),\n", " ('fox', 'NOUN(OBJ)'),\n", " ('fox', 'NOUN(SUBJECT)'),\n", - " ('fox', 'VERB'),\n", " ('jumps', 'VERB'),\n", " ('lazy', 'DET'),\n", " ('lazy', 'NOUN(OBJ)'),\n", @@ -304,7 +307,6 @@ " ('over', 'NOUN(OBJ)'),\n", " ('over', 'NOUN(SUBJECT)'),\n", " ('over', 'VERB'),\n", - " ('quick', 'DET'),\n", " ('quick', 'NOUN(OBJ)'),\n", " ('quick', 'NOUN(SUBJECT)'),\n", " ('quick', 'VERB'),\n", @@ -312,6 +314,9 @@ " ('the', 'NOUN(OBJ)'),\n", " ('the', 'NOUN(SUBJECT)'),\n", " ('the', 'VERB')}\n", + "Calling with noun_immediately_precedes_verb\n", + "noun_immediately_precedes_verb removed 0 elements\n", + "set()\n", "Calling with remove_noun_nodoubles\n", "remove_noun_nodoubles removed 0 elements\n", "set()\n", @@ -328,15 +333,12 @@ "data": { "text/plain": [ "{('brown', 'DET'),\n", - " ('brown', 'NOUN(OBJ)'),\n", - " ('brown', 'NOUN(SUBJECT)'),\n", " ('brown', 'VERB'),\n", " ('dog', 'NOUN(OBJ)'),\n", " ('dog', 'NOUN(SUBJECT)'),\n", " ('dog', 'VERB'),\n", " ('fox', 'NOUN(OBJ)'),\n", " ('fox', 'NOUN(SUBJECT)'),\n", - " ('fox', 'VERB'),\n", " ('jumps', 'VERB'),\n", " ('lazy', 'DET'),\n", " ('lazy', 'NOUN(OBJ)'),\n", @@ -346,7 +348,6 @@ " ('over', 'NOUN(OBJ)'),\n", " ('over', 'NOUN(SUBJECT)'),\n", " ('over', 'VERB'),\n", - " ('quick', 'DET'),\n", " ('quick', 'NOUN(OBJ)'),\n", " ('quick', 'NOUN(SUBJECT)'),\n", " ('quick', 'VERB'),\n", @@ -356,7 +357,7 @@ " ('the', 'VERB')}" ] }, - "execution_count": 118, + "execution_count": 123, "metadata": {}, "output_type": "execute_result" }