Skip to content
Snippets Groups Projects
Commit d8fa6177 authored by Heiko Raible's avatar Heiko Raible
Browse files

Merge branch 'stheraib-main-patch-83607' into 'main'

Update grammar_checker.py

See merge request !12
parents 4c655d08 e9438e41
Branches
No related tags found
1 merge request!12Update grammar_checker.py
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment