fixed bug which caused trained NER to be inserted in wrong position in Pipe
+import logging
+from typing import Union
+
+import pyspark
+import sparknlp
from pyspark.sql.types import StructType, StructField, StringType
+from sparknlp.base import *
+from sparknlp.base import LightPipeline
+from nlu.pipe.col_substitution.col_name_substitution_utils import ColSubstitutionUtils
+from nlu.pipe.extractors.extractor_configs_HC import default_full_config
+from nlu.pipe.extractors.extractor_methods.base_extractor_methods import *
from nlu.pipe.extractors.extractor_methods.ocr_extractors import extract_tables
-from nlu.pipe.utils.resolution.storage_ref_utils import StorageRefUtils
+from nlu.pipe.nlu_component import NluComponent
+from nlu.pipe.pipe_logic import PipeUtils
from nlu.pipe.utils.component_utils import ComponentUtils
-from nlu.pipe.utils.output_level_resolution_utils import OutputLevelUtils
from nlu.pipe.utils.data_conversion_utils import DataConversionUtils
-from nlu.utils.environment.env_utils import is_running_in_databricks
-from nlu.pipe.col_substitution.col_name_substitution_utils import ColSubstitutionUtils
+from nlu.pipe.utils.output_level_resolution_utils import OutputLevelUtils
+from nlu.pipe.utils.resolution.storage_ref_utils import StorageRefUtils
from nlu.universe.universes import Licenses
-from nlu.pipe.nlu_component import NluComponent
-from nlu.pipe.extractors.extractor_methods.base_extractor_methods import *
-from typing import List, Union
-from sparknlp.base import *
-from sparknlp.base import LightPipeline
-from nlu.pipe.extractors.extractor_configs_HC import default_full_config
-from nlu.pipe.pipe_logic import PipeUtils
-from nlu.universe.component_universes import NLP_NODE_IDS
-import sparknlp
-import pyspark
-import pandas as pd
-import numpy as np
-import logging
+from nlu.utils.environment.env_utils import is_running_in_databricks
logger = logging.getLogger('nlu')
@@ -209,7 +207,6 @@ class NLUPipeline(dict):
return self
-
def get_extraction_configs(self, full_meta, positions, get_embeddings):
"""Search first OC namespace and if not found the HC Namespace for each Annotator Class in pipeline and get
corresponding config Returns a dictionary of methods, where keys are column names values are methods that
@@ -311,7 +308,6 @@ class NLUPipeline(dict):
return processed[0]
return processed
-
stranger_features += ['origin_index']
if output_level == '':
# Infer output level if none defined
