From e9438e41562bd1b3bc724c879269c7e6e6e1907f Mon Sep 17 00:00:00 2001
From: Heiko Raible <heiko.raible@stud.h-da.de>
Date: Thu, 17 Feb 2022 17:38:28 +0000
Subject: [PATCH] Update grammar_checker.py

---
 deployment/grammar_checker.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/deployment/grammar_checker.py b/deployment/grammar_checker.py
index f7abf79..ddbf90d 100644
--- a/deployment/grammar_checker.py
+++ b/deployment/grammar_checker.py
@@ -1,15 +1,8 @@
-import ast
-import sys
-import time
 import json
-import math
 import nltk
 import requests
-import pandas as pd
 import threading
 import numpy as np
-from nltk import TweetTokenizer
-from nltk.util import ngrams
 from time import sleep
 from tester import Tester
 
@@ -274,7 +267,8 @@ class GrammarChecker:
                 i_errors.append(index)
                 max_counter = counter
 
-        print(f"thresholds_passed: {thresholds_passed}")
+        print(f"below thresholds? bi-gram: {thresholds_passed[2]}, tri-gram: {thresholds_passed[3]}")
+        print("notice: sentence level thresholds ignored. we currently always assume an error.")
         return i_errors
 
 
-- 
GitLab