From d0d1459d8d93f39e3b3dd89eedabf565b7211f6d Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 28 Apr 2023 09:55:14 +0200 Subject: [PATCH] Upgrade clean method --- zad7neural_networks.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zad7neural_networks.ipynb b/zad7neural_networks.ipynb index bbbd355..1753414 100644 --- a/zad7neural_networks.ipynb +++ b/zad7neural_networks.ipynb @@ -64,8 +64,8 @@ "def clean_text(line: str):\n", " # Preprocessing\n", " separated = line.split('\\t')\n", - " prefix = separated[6].replace(r'\\n', ' ').replace('\\\\n', ' ').replace(' ', ' ').replace('.', '').replace(',', '').replace('?', '').replace('!', '').replace('(', '').replace(')', '').replace(';', '').replace(':', '').replace('\"', '').replace(\"'\", '').replace('-', ' ').replace(' ', ' ').lower()\n", - " suffix = separated[7].replace(r'\\n', ' ').replace('\\\\n', ' ').replace(' ', ' ').replace('.', '').replace(',', '').replace('?', '').replace('!', '').replace('(', '').replace(')', '').replace(';', '').replace(':', '').replace('\"', '').replace(\"'\", '').replace('-', ' ').replace(' ', ' ').lower()\n", + " prefix = separated[6].replace(r'\\n', ' ').replace('\\\\n', ' ').replace(' ', ' ').replace('.', '').replace(',', '').replace('?', '').replace('!', '').replace('(', '').replace(')', '').replace(';', '').replace(':', '').replace('\"', '').replace(\"'\", '').replace('-', ' ').replace(' ', ' ')\n", + " suffix = separated[7].replace(r'\\n', ' ').replace('\\\\n', ' ').replace(' ', ' ').replace('.', '').replace(',', '').replace('?', '').replace('!', '').replace('(', '').replace(')', '').replace(';', '').replace(':', '').replace('\"', '').replace(\"'\", '').replace('-', ' ').replace(' ', ' ')\n", " return prefix + ' ' + suffix" ] },