Commit 68ce9a74 authored by Raul Sirel's avatar Raul Sirel
Browse files

load test settings from env

parent 6d440a82
......@@ -10,6 +10,8 @@ Test:
stage: test
tags:
- ci-test
# variables:
# MLP_TESTS_RESOURCE_DIR:
script:
- python -m pytest -v tests
......
from texta_mlp.mlp import DEFAULT_RESOURCE_DIR
import os
TESTS_RESOURCE_DIR = os.getenv("MLP_TESTS_RESOURCE_DIR", DEFAULT_RESOURCE_DIR)
from texta_mlp.mlp import MLP
from tests.settings import TESTS_RESOURCE_DIR
mlp = MLP(language_codes=["et", "ru", "ar"], resource_dir=TESTS_RESOURCE_DIR)
mlp = MLP(language_codes=["et", "ru", "ar"])
test_texts = [
"Erinevad riigid käituvad siin väga erinevalt. Eestil on suhtes viirusinfoga arenguruumi, leiab Raul Rebane Vikerraadio päevakommentaaris.",
......
......@@ -9,7 +9,6 @@ from lang_trans.arabic import buckwalter
from .fact import Fact
# create Entity Mapper instance
ENTITY_MAPPER_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "entity_mapper")
ENTITY_MAPPER_FILES = [os.path.join(ENTITY_MAPPER_DIR, path) for path in os.listdir(ENTITY_MAPPER_DIR)]
......@@ -131,9 +130,6 @@ class Document:
translit_word = self._transliterate_russian_word(word)
elif self.dominant_language_code == "ar":
translit_word = self._transliterate_arabic_word(word)
self.__transliteration.append(translit_word)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment