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

Support None for get_doc_existed_opinion_func [user/paper feedback] #469

Closed
nicolay-r opened this issue May 13, 2023 · 1 comment
Closed
Assignees
Labels
critical enhancement New feature or request task

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented May 13, 2023

Reason: for the snippet below, it would be so handy to avoid get_doc_existed_opinions_func / consider None by default, in the case when there is no such preliminary annotation.

AlgorithmBasedTextOpinionAnnotator(
    PairBasedOpinionAnnotationAlgorithm(
     dist_in_terms_bound=50,
     label_provider=
      ConstantLabelProvider(NoLabel())),
    value_to_group_id_func=
     lambda v: stemmer.lemmatize_to_str(v))
    get_doc_existed_opinions_func=
     lambda _: OpinionCollection(synonyms),
    create_empty_collection_func=
     lambda: OpinionCollection(synonyms))
   ],

def __init__(self, annot_algo, create_empty_collection_func, get_doc_existed_opinions_func):

@nicolay-r nicolay-r added enhancement New feature or request task critical labels May 13, 2023
@nicolay-r nicolay-r self-assigned this May 13, 2023
@nicolay-r nicolay-r changed the title Support None for get_doc_existed_opinion_func Support None for get_doc_existed_opinion_func [user/paper feedback] May 13, 2023
@nicolay-r
Copy link
Owner Author

It actually supports the following parameter setup:

get_doc_existed_opinions_func=lambda _: None,

get_doc_existed_opinions_func=lambda _: None,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical enhancement New feature or request task
Projects
None yet
Development

No branches or pull requests

1 participant