<commit_before>#!/usr/bin/env python3
# FeedbackAligner.py


import re, sys, pickle
import os.path 
import itertools
import time, json
import pymysql

from TW_strongs_ref_lookup import TWs


class FeedbackAligner:
	def __init__(self,db,src,src_tablename,trg,trg_tablename,alignment_tablename):

		self.db = db
		
		cur = self.db.cursor()
		
		self.src_table_name = src_tablename
		self.trg_table_name = trg_tablename

		self.alignment_table_name = alignment_tablename
		# self.FeedbackLookup_table_name = src+"_"+trg+"_FeedbackLookup"

		cur.execute("SHOW TABLES LIKE '"+self.src_table_name+"'")
		if cur.rowcount==0:
			print("Table not found: "+self.src_table_name)
			sys.exit(1)


		cur.execute("SHOW TABLES LIKE '"+self.trg_table_name+"'")
		if cur.rowcount==0:
			print("Table not found: "+self.trg_table_name)<commit_msg>Added . to file to load correctly<commit_after>#!/usr/bin/env python3
# FeedbackAligner.py


import re, sys, pickle
import os.path 
import itertools
import time, json
import pymysql

from .TW_strongs_ref_lookup import TWs


class FeedbackAligner:
	def __init__(self,db,src,src_tablename,trg,trg_tablename,alignment_tablename):

		self.db = db
		
		cur = self.db.cursor()
		
		self.src_table_name = src_tablename
		self.trg_table_name = trg_tablename

		self.alignment_table_name = alignment_tablename
		# self.FeedbackLookup_table_name = src+"_"+trg+"_FeedbackLookup"

		cur.execute("SHOW TABLES LIKE '"+self.src_table_name+"'")
		if cur.rowcount==0:
			print("Table not found: "+self.src_table_name)
			sys.exit(1)


		cur.execute("SHOW TABLES LIKE '"+self.trg_table_name+"'")
		if cur.rowcount==0:
			print("Table not found: "+self.trg_table_name)
{'fraction_non_alphanumeric': 0.11568276684555755, 'fraction_numerical': 0.004770423375074538, 'mean_word_length': 5.146520146520147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6580494', 'n_tokens_mistral': 704, 'n_tokens_neox': 630, 'n_words': 118}