From 412d0c0f62783406b4775000e460d73230c3f635 Mon Sep 17 00:00:00 2001 From: Luka Date: Thu, 17 Sep 2020 14:17:40 +0200 Subject: [PATCH] Changing file structure --- luscenje_struktur/component.py | 6 ++--- luscenje_struktur/formatter.py | 2 +- luscenje_struktur/lemma_features.py | 2 +- luscenje_struktur/loader.py | 4 ++-- luscenje_struktur/match.py | 2 +- luscenje_struktur/match_store.py | 6 ++--- luscenje_struktur/representation.py | 6 ++--- luscenje_struktur/representation_assigner.py | 2 +- luscenje_struktur/restriction.py | 2 +- luscenje_struktur/sloleks_db.py | 2 +- luscenje_struktur/syntactic_structure.py | 4 ++-- luscenje_struktur/wani.py | 24 ++++++++++---------- luscenje_struktur/word.py | 2 +- luscenje_struktur/word_stats.py | 2 +- luscenje_struktur/writer.py | 6 ++--- 15 files changed, 36 insertions(+), 36 deletions(-) diff --git a/luscenje_struktur/component.py b/luscenje_struktur/component.py index 918d8fa..adeb46e 100644 --- a/luscenje_struktur/component.py +++ b/luscenje_struktur/component.py @@ -1,9 +1,9 @@ from enum import Enum import logging -from restriction import Restriction -from order import Order -from representation_assigner import RepresentationAssigner +from luscenje_struktur.restriction import Restriction +from luscenje_struktur.order import Order +from luscenje_struktur.representation_assigner import RepresentationAssigner class ComponentStatus(Enum): diff --git a/luscenje_struktur/formatter.py b/luscenje_struktur/formatter.py index 26f4f12..2ea8316 100644 --- a/luscenje_struktur/formatter.py +++ b/luscenje_struktur/formatter.py @@ -1,7 +1,7 @@ from math import log2 import re -from component import ComponentType +from luscenje_struktur.component import ComponentType class Formatter: diff --git a/luscenje_struktur/lemma_features.py b/luscenje_struktur/lemma_features.py index a11ce49..ef9cea5 100644 --- a/luscenje_struktur/lemma_features.py +++ b/luscenje_struktur/lemma_features.py @@ -1,4 +1,4 @@ -from restriction import MorphologyRegex +from luscenje_struktur.restriction import MorphologyRegex def get_lemma_features(et): diff --git a/luscenje_struktur/loader.py b/luscenje_struktur/loader.py index 1d6f86e..e844a9c 100644 --- a/luscenje_struktur/loader.py +++ b/luscenje_struktur/loader.py @@ -6,8 +6,8 @@ import sys import gzip import pathlib -from progress_bar import progress -from word import Word +from luscenje_struktur.progress_bar import progress +from luscenje_struktur.word import Word def is_root_id(id_): diff --git a/luscenje_struktur/match.py b/luscenje_struktur/match.py index d3f82ef..d1e0fd9 100644 --- a/luscenje_struktur/match.py +++ b/luscenje_struktur/match.py @@ -1,4 +1,4 @@ -from word import Word +from luscenje_struktur.word import Word class StructureMatch: def __init__(self, match_id, structure): diff --git a/luscenje_struktur/match_store.py b/luscenje_struktur/match_store.py index ed5bcb0..ec24a64 100644 --- a/luscenje_struktur/match_store.py +++ b/luscenje_struktur/match_store.py @@ -3,9 +3,9 @@ from collections import defaultdict from ast import literal_eval from time import time -from match import StructureMatch -from representation_assigner import RepresentationAssigner -from progress_bar import progress +from luscenje_struktur.match import StructureMatch +from luscenje_struktur.representation_assigner import RepresentationAssigner +from luscenje_struktur.progress_bar import progress class MatchStore: def __init__(self, args, db): diff --git a/luscenje_struktur/representation.py b/luscenje_struktur/representation.py index 3d6c2a9..b199163 100644 --- a/luscenje_struktur/representation.py +++ b/luscenje_struktur/representation.py @@ -1,10 +1,10 @@ import logging from collections import Counter -from codes_tagset import TAGSET, CODES -from word import WordMsdOnly +from luscenje_struktur.codes_tagset import TAGSET, CODES +from luscenje_struktur.word import WordMsdOnly -from word import WordDummy +from luscenje_struktur.word import WordDummy class ComponentRepresentation: diff --git a/luscenje_struktur/representation_assigner.py b/luscenje_struktur/representation_assigner.py index 822a1b1..88eed7f 100644 --- a/luscenje_struktur/representation_assigner.py +++ b/luscenje_struktur/representation_assigner.py @@ -1,4 +1,4 @@ -from representation import ComponentRepresentation, LemmaCR, LexisCR, WordFormAgreementCR, WordFormAnyCR, WordFormMsdCR, WordFormAllCR +from luscenje_struktur.representation import ComponentRepresentation, LemmaCR, LexisCR, WordFormAgreementCR, WordFormAnyCR, WordFormMsdCR, WordFormAllCR class RepresentationAssigner: def __init__(self): diff --git a/luscenje_struktur/restriction.py b/luscenje_struktur/restriction.py index 199ad07..afd1da4 100644 --- a/luscenje_struktur/restriction.py +++ b/luscenje_struktur/restriction.py @@ -1,7 +1,7 @@ import re from enum import Enum -from codes_tagset import CODES, TAGSET +from luscenje_struktur.codes_tagset import CODES, TAGSET class RestrictionType(Enum): diff --git a/luscenje_struktur/sloleks_db.py b/luscenje_struktur/sloleks_db.py index ba3d3b6..1e5f8c7 100644 --- a/luscenje_struktur/sloleks_db.py +++ b/luscenje_struktur/sloleks_db.py @@ -7,7 +7,7 @@ from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import Session, aliased from sqlalchemy import create_engine -from codes_tagset import TAGSET, CODES, CODES_TRANSLATION, POSSIBLE_WORD_FORM_FEATURE_VALUES +from luscenje_struktur.codes_tagset import TAGSET, CODES, CODES_TRANSLATION, POSSIBLE_WORD_FORM_FEATURE_VALUES class SloleksDatabase: diff --git a/luscenje_struktur/syntactic_structure.py b/luscenje_struktur/syntactic_structure.py index 222fe35..4438c5b 100644 --- a/luscenje_struktur/syntactic_structure.py +++ b/luscenje_struktur/syntactic_structure.py @@ -2,8 +2,8 @@ from xml.etree import ElementTree import logging import pickle -from component import Component, ComponentType -from lemma_features import get_lemma_features +from luscenje_struktur.component import Component, ComponentType +from luscenje_struktur.lemma_features import get_lemma_features class SyntacticStructure: def __init__(self): diff --git a/luscenje_struktur/wani.py b/luscenje_struktur/wani.py index 31aa71f..021f7a2 100644 --- a/luscenje_struktur/wani.py +++ b/luscenje_struktur/wani.py @@ -10,18 +10,18 @@ import subprocess import concurrent.futures import tempfile -from progress_bar import progress -from sloleks_db import SloleksDatabase -from word import Word -from syntactic_structure import build_structures -from match_store import MatchStore -from word_stats import WordStats -from writer import Writer -from loader import load_files -from database import Database -from time_info import TimeInfo - -from postprocessor import Postprocessor +from luscenje_struktur.progress_bar import progress +from luscenje_struktur.sloleks_db import SloleksDatabase +from luscenje_struktur.word import Word +from luscenje_struktur.syntactic_structure import build_structures +from luscenje_struktur.match_store import MatchStore +from luscenje_struktur.word_stats import WordStats +from luscenje_struktur.writer import Writer +from luscenje_struktur.loader import load_files +from luscenje_struktur.database import Database +from luscenje_struktur.time_info import TimeInfo + +from luscenje_struktur.postprocessor import Postprocessor def match_file(words, structures, postprocessor): diff --git a/luscenje_struktur/word.py b/luscenje_struktur/word.py index 212331f..d168070 100644 --- a/luscenje_struktur/word.py +++ b/luscenje_struktur/word.py @@ -1,7 +1,7 @@ from collections import defaultdict import logging -from msd_translate import MSD_TRANSLATE +from luscenje_struktur.msd_translate import MSD_TRANSLATE class WordCompressed: diff --git a/luscenje_struktur/word_stats.py b/luscenje_struktur/word_stats.py index 85b83fe..7ca87a4 100644 --- a/luscenje_struktur/word_stats.py +++ b/luscenje_struktur/word_stats.py @@ -1,6 +1,6 @@ from collections import defaultdict, Counter -from progress_bar import progress +from luscenje_struktur.progress_bar import progress class WordStats: diff --git a/luscenje_struktur/writer.py b/luscenje_struktur/writer.py index 4f665aa..c6c14b8 100644 --- a/luscenje_struktur/writer.py +++ b/luscenje_struktur/writer.py @@ -1,11 +1,11 @@ import logging import os -from progress_bar import progress +from luscenje_struktur.progress_bar import progress -from formatter import OutFormatter, OutNoStatFormatter, AllFormatter, StatsFormatter +from luscenje_struktur.formatter import OutFormatter, OutNoStatFormatter, AllFormatter, StatsFormatter -from collocation_sentence_mapper import CollocationSentenceMapper +from luscenje_struktur.collocation_sentence_mapper import CollocationSentenceMapper class Writer: