nicolay-r/AREkit

`SentiNEREL` collection serialization -- `create_train_pipeline` and `create_test_pipeline` are the same

nicolay-r opened this issue · 0 comments

def create_train_pipeline(text_parser, doc_ops, annotators, text_opinion_filters):
""" Train pipeline is based on the predefined annotations and
automatic annotations of other pairs with a NoLabel.
"""
return text_opinion_extraction_pipeline(
get_doc_by_id_func=doc_ops.by_id,
text_parser=text_parser,
annotators=annotators,
text_opinion_filters=text_opinion_filters)
def create_test_pipeline(text_parser, doc_ops, annotators, text_opinion_filters):
""" This is a pipeline for TEST data annotation.
We perform annotation of the attitudes.
"""
assert(isinstance(text_parser, BaseTextParser))
assert(isinstance(annotators, list))
assert(isinstance(doc_ops, DocumentOperations))
return text_opinion_extraction_pipeline(
annotators=annotators,
text_parser=text_parser,
get_doc_by_id_func=doc_ops.by_id,
text_opinion_filters=text_opinion_filters)