deeplotx 0.9.3__tar.gz → 0.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deeplotx-0.9.3 → deeplotx-0.9.4}/PKG-INFO +1 -1
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/ner/bert_ner.py +4 -3
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx.egg-info/PKG-INFO +1 -1
- {deeplotx-0.9.3 → deeplotx-0.9.4}/pyproject.toml +1 -1
- {deeplotx-0.9.3 → deeplotx-0.9.4}/LICENSE +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/README.md +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/encoder/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/encoder/encoder.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/encoder/long_text_encoder.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/encoder/longformer_encoder.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/ner/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/ner/base_ner.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/ner/n2g/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/ner/named_entity.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/attention.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/auto_regression.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/base_neural_network.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/feed_forward.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/linear_regression.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/logistic_regression.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/long_context_auto_regression.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/long_context_recursive_sequential.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/multi_head_attention.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/multi_head_feed_forward.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/recursive_sequential.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/roformer_encoder.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/rope.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/nn/softmax_regression.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/similarity/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/similarity/distribution.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/similarity/set.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/similarity/vector.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/trainer/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/trainer/base_trainer.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/trainer/text_binary_classification_trainer.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/util/__init__.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/util/hash.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx/util/read_file.py +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx.egg-info/SOURCES.txt +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx.egg-info/dependency_links.txt +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx.egg-info/requires.txt +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/deeplotx.egg-info/top_level.txt +0 -0
- {deeplotx-0.9.3 → deeplotx-0.9.4}/setup.cfg +0 -0
@@ -115,7 +115,7 @@ class BertNER(BaseNER):
|
|
115
115
|
if not _continue:
|
116
116
|
break
|
117
117
|
if not deduplicate:
|
118
|
-
return _tmp_entities
|
118
|
+
return sorted(_tmp_entities, key=lambda _: _.text[0], reverse=False)
|
119
119
|
_fin_entities = dict()
|
120
120
|
texts = set([text.text for text in _tmp_entities])
|
121
121
|
for text in texts:
|
@@ -126,10 +126,11 @@ class BertNER(BaseNER):
|
|
126
126
|
else:
|
127
127
|
if _ent.base_probability > _fin_entities[_ent.text].base_probability:
|
128
128
|
_fin_entities[_ent.text] = _ent
|
129
|
-
return [v for k, v in _fin_entities.items()]
|
129
|
+
return sorted([v for k, v in _fin_entities.items()], key=lambda _: _.text[0], reverse=False)
|
130
130
|
|
131
131
|
def __call__(self, s: str, with_gender: bool = True, prob_threshold: float = .0, fast_mode: bool = False, *args, **kwargs):
|
132
132
|
if fast_mode:
|
133
133
|
return self._fast_extract(s=s, with_gender=with_gender, prob_threshold=prob_threshold)
|
134
134
|
else:
|
135
|
-
return self._slow_extract(s=s, with_gender=with_gender, prob_threshold=prob_threshold,
|
135
|
+
return self._slow_extract(s=s, with_gender=with_gender, prob_threshold=prob_threshold,
|
136
|
+
deduplicate=kwargs.get('deduplicate', True))
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|