{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Structured Prediction Exercises\n", "\n", "In the lecture we have looked at a simple toy structured prediction application and model. In this exercise you will change and improve it. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setup 1: Load Libraries" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%%capture\n", "%load_ext autoreload\n", "%autoreload 2\n", "%matplotlib inline\n", "import sys\n", "sys.path.append(\"..\")\n", "import statnlpbook.util as util\n", "import matplotlib\n", "import matplotlib.pyplot as plt\n", "matplotlib.rcParams['figure.figsize'] = (10.0, 6.0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Task 1: Different Representation\n", "Find a different representation and model that also achieves perfect accuracy. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Yesterday I ate a red apple | Gestern aß ich einen roten Apfel |
Yesterday I ate a red apply with a friend | Gestern aß ich einen roten Apfel mit einem Freund |