Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions source/new_main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import codecs
import logging

from otml_configuration_manager import OtmlConfigurationManager
from pathlib import Path


current_file_path = Path(__file__)
source_directory_path = current_file_path.parent
fixtures_directory_path = Path(source_directory_path, "tests", "fixtures")


configuration_file_path = "/Users/iddoberger/Documents/MercurialRepositories/otml/source/tests/fixtures/configuration/otml_configuration.json"
configuration_file_path = str(Path(fixtures_directory_path, "configuration", "otml_configuration.json"))

configuration_json_str = codecs.open(configuration_file_path, 'r').read()
OtmlConfigurationManager(configuration_json_str)
Expand All @@ -17,12 +25,18 @@



logger = logging.getLogger()
logger.setLevel(logging.INFO)

file_log_formatter = logging.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s', "%Y-%m-%d %H:%M:%S")
file_log_handler = logging.FileHandler("my.log", mode='w')
file_log_handler.setFormatter(file_log_formatter)
logger.addHandler(file_log_handler)


feature_table_file_path = "/Users/iddoberger/Documents/MercurialRepositories/otml/source/tests/fixtures/feature_table/french_deletion_feature_table.json"
corpus_file_path = "/Users/iddoberger/Documents/MercurialRepositories/otml/source/tests/fixtures/corpora/french_deletion_corpus.txt"
constraint_set_file_path = "/Users/iddoberger/Documents/MercurialRepositories/otml/source/tests/fixtures/constraint_sets/french_deletion_constraint_set.json"
feature_table_file_path = str(Path(fixtures_directory_path, "feature_table", "french_deletion_feature_table.json"))
corpus_file_path = str(Path(fixtures_directory_path, "corpora", "french_deletion_corpus.txt"))
constraint_set_file_path = str(Path(fixtures_directory_path, "constraint_sets", "french_deletion_constraint_set.json"))


configuration_json_str = codecs.open(configuration_file_path, 'r').read()
Expand Down