Skip to content

Commit

Permalink
fixed bug with feature resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
fmatthies committed Nov 8, 2024
1 parent e384127 commit b2d73a4
Show file tree
Hide file tree
Showing 8 changed files with 3,990 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ def process(self, response) -> "response_consumer_return_value":
if _dupl is not None:
logging.warning(
f"Removed {_dupl} from 'add_feature' for entry '{check_dict.entry_name}_{_label}'.")
for k, v in check_dict.additional_feats.items(): # Provide the "add_feature" values
_feat_val = anno.get(k)
for target_feature, mapping_tuple in check_dict.additional_feats.items(): # Provide the "add_feature" values
_feat_val = mapping_tuple[0](anno,mapping_tuple[1])
if _feat_val is not None:
_final_features[k] = _feat_val
_final_features[target_feature] = _feat_val
self.count += 1
break # Stacking layers is not allowed
# else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def add_prediction_to_cas(
feature,
_begin,
_end,
response.labels[i] if feature not in response.features[i] else response.features[i],
response.labels[i] if feature not in response.features[i] else response.features[i][feature],
response.score[i],
)
cas.add(prediction)
Expand Down
88 changes: 88 additions & 0 deletions inception_ahd_recommender/tests/resources/Baastrup.general.xmi

Large diffs are not rendered by default.

Loading

0 comments on commit b2d73a4

Please sign in to comment.