Skip to content
Snippets Groups Projects

Update grammar_checker.py

Merged Heiko Raible requested to merge stheraib-main-patch-83607 into main
1 file
+ 2
8
Compare changes
  • Side-by-side
  • Inline
import ast
import sys
import time
import json
import json
import math
import nltk
import nltk
import requests
import requests
import pandas as pd
import threading
import threading
import numpy as np
import numpy as np
from nltk import TweetTokenizer
from nltk.util import ngrams
from time import sleep
from time import sleep
from tester import Tester
from tester import Tester
@@ -274,7 +267,8 @@ class GrammarChecker:
@@ -274,7 +267,8 @@ class GrammarChecker:
i_errors.append(index)
i_errors.append(index)
max_counter = counter
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
return i_errors
Loading