Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpinionEntityType -- this should be generalized #335

Closed
1 task
nicolay-r opened this issue Jun 16, 2022 · 0 comments
Closed
1 task

OpinionEntityType -- this should be generalized #335

nicolay-r opened this issue Jun 16, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented Jun 16, 2022

def __get_entity_type(e_ind, subj_ind_set, obj_ind_set):
assert(isinstance(e_ind, int))
assert(isinstance(subj_ind_set, set))
assert(isinstance(obj_ind_set, set))
result = OpinionEntityType.Other
if e_ind in obj_ind_set:
result = OpinionEntityType.Object
elif e_ind in subj_ind_set:
result = OpinionEntityType.Subject
return result

  • Bug in case of formatters which provide masks that cound not be found in embedding:
        labels_scaler=CustomLabelScaler(),
        embedding=RusvectoresEmbedding.from_word2vec_format(
            filepath="data/news_mystem_skipgram_1000_20_2015.bin.gz", binary=True),
        annotator=None,
        terms_per_context=terms_per_context,
        str_entity_formatter=SimpleUppercasedEntityFormatter(), # <-- causes exception when entring could not be found in embedding vocabulary
        pos_tagger=pos_tagger,
        name_provider=ExperimentNameProvider(name="serialize", suffix="nn"),
        frames_collection=frames_collection,
        frame_variant_collection=frame_variant_collection,
        data_folding=data_folding)
@nicolay-r nicolay-r added the enhancement New feature or request label Jun 16, 2022
@nicolay-r nicolay-r self-assigned this Jun 16, 2022
@nicolay-r nicolay-r added the bug Something isn't working label Jun 16, 2022
nicolay-r added a commit that referenced this issue Jun 22, 2022
…or from parts rather than seeking such in an Embedding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant