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

Update grammar_checker.py

parent 4c655d08
No related branches found
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