Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
moved annotators to annotation package (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
de-code authored Oct 20, 2020
1 parent e7f6baf commit f963bee
Show file tree
Hide file tree
Showing 19 changed files with 20 additions and 20 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
strip_tag_prefix
)

from .grobid_training_tei import (
from ..structured_document.grobid_training_tei import (
SUB_LEVEL,
load_grobid_training_tei_structured_document,
save_grobid_training_tei_structured_document,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
GrobidTrainingTeiStructuredDocument
)

from sciencebeam_trainer_grobid_tools.structured_document.simple_matching_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.simple_matching_annotator import (
get_extended_line_token_tags,
to_inside_tag
)

from sciencebeam_trainer_grobid_tools.structured_document.matching_utils import (
from sciencebeam_trainer_grobid_tools.annotation.matching_utils import (
JoinedText
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
iter_fuzzy_search_all_index_ranges
)

from sciencebeam_trainer_grobid_tools.structured_document.matching_utils import (
from sciencebeam_trainer_grobid_tools.annotation.matching_utils import (
SequenceWrapper,
PendingSequences,
SequencesText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
GrobidTrainingTeiStructuredDocument
)

from sciencebeam_trainer_grobid_tools.structured_document.simple_matching_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.simple_matching_annotator import (
SimpleMatchingAnnotator
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
AnnotatorConfig
)

from .structured_document.simple_matching_annotator import (
from .annotation.simple_matching_annotator import (
SimpleMatchingAnnotator
)

from .structured_document.affiliation_address_annotator import (
from .annotation.affiliation_address_annotator import (
AffiliationAddressAnnotatorConfig,
AffiliationAddressPostProcessingAnnotator
)
Expand Down
4 changes: 2 additions & 2 deletions sciencebeam_trainer_grobid_tools/auto_annotate_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
AnnotatorConfig
)

from .structured_document.simple_matching_annotator import (
from .annotation.simple_matching_annotator import (
SimpleMatchingAnnotator
)

from .structured_document.reference_annotator import (
from .annotation.reference_annotator import (
DEFAULT_IDNO_PREFIX_REGEX,
ReferenceAnnotatorConfig,
ReferencePostProcessingAnnotator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ContainerNodePaths,
DEFAULT_TAG_KEY
)
from .structured_document.segmentation_annotator import (
from .annotation.segmentation_annotator import (
SegmentationAnnotator,
SegmentationConfig,
parse_segmentation_config
Expand Down
6 changes: 3 additions & 3 deletions sciencebeam_trainer_grobid_tools/auto_annotate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
from .utils.string import comma_separated_str_to_list, parse_dict
from .utils.regex import regex_change_name
from .utils.xml import parse_xml
from .structured_document.annotator import annotate_structured_document
from .annotation.annotator import annotate_structured_document

from .structured_document.line_number_annotator import (
from .annotation.line_number_annotator import (
DEFAULT_MIN_LINE_NUMBER_COUNT,
DEFAULT_MAX_LINE_NUMBER_GAP,
DEFAULT_LINE_NUMBER_RATIO_THRESHOLD,
TextLineNumberAnnotatorConfig,
TextLineNumberAnnotator
)

from .structured_document.simple_matching_annotator import (
from .annotation.simple_matching_annotator import (
SimpleMatchingAnnotator,
SimpleSimpleMatchingConfig,
get_simple_tag_config_map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
DEFAULT_TAG_TO_TEI_PATH_MAPPING as _DEFAULT_TAG_TO_TEI_PATH_MAPPING
)

from sciencebeam_trainer_grobid_tools.structured_document.annotator import (
from sciencebeam_trainer_grobid_tools.annotation.annotator import (
annotate_structured_document_inplace
)

from .grobid_training_tei_test import _tei
from ..structured_document.grobid_training_tei_test import _tei


LOGGER = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ContainerNodePaths
)

from sciencebeam_trainer_grobid_tools.structured_document.line_number_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.line_number_annotator import (
TextLineNumberAnnotatorConfig,
TextLineNumberAnnotator,
DEFAULT_LINE_NO_TAG as LINE_NO_TAG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SimpleToken
)

from sciencebeam_trainer_grobid_tools.structured_document.matching_utils import (
from sciencebeam_trainer_grobid_tools.annotation.matching_utils import (
join_with_index_ranges,
SequenceWrapper
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sciencebeam_trainer_grobid_tools.structured_document.reference_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.reference_annotator import (
DEFAULT_IDNO_PREFIX_REGEX,
get_prefix_extended_token_tags,
get_suffix_extended_token_tags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
I_TAG_PREFIX
)

from sciencebeam_trainer_grobid_tools.structured_document.segmentation_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.segmentation_annotator import (
parse_segmentation_config,
SegmentationConfig,
SegmentationAnnotator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
TargetAnnotation
)

from sciencebeam_trainer_grobid_tools.structured_document.simple_matching_annotator import (
from sciencebeam_trainer_grobid_tools.annotation.simple_matching_annotator import (
SimpleTagConfig,
SimpleMatchingAnnotator,
get_extended_line_token_tags,
Expand Down

0 comments on commit f963bee

Please sign in to comment.