def bug_feature_classification(review, topics): # WE import the module only when its required. import fawkes.algorithms.categorisation.text_match.categoriser as text_match_categoriser _, category = text_match_categoriser.text_match(review.message, topics) # Add the bug-feature classification to the review's derived insight and return the review review.derived_insight.extra_properties[constants.BUG_FEATURE] = category # Return the review return review
def text_match_categortization(review, app_config, topics): # Find the category of the review category_scores, category = text_match_categoriser.text_match( review.message, topics) # Add the category to the review's derived insight and return the review review.derived_insight.category = category # Add the category scores. review.derived_insight.extra_properties[ constants.CATEGORY_SCORES] = category_scores # Return the review return review
def text_match_categortization(review, app_config, topics): # WE import the module only when its required. import fawkes.algorithms.categorisation.text_match.categoriser as text_match_categoriser # Find the category of the review category_scores, category = text_match_categoriser.text_match( review.message, topics) # Add the category to the review's derived insight and return the review review.derived_insight.category = category # Add the category scores. review.derived_insight.extra_properties[constants.CATEGORY_SCORES] = category_scores # Return the review return review
def bug_feature_classification(review, topics): _, category = text_match_categoriser.text_match(review.message, topics) # Add the bug-feature classification to the review's derived insight and return the review review.derived_insight.extra_properties[constants.BUG_FEATURE] = category # Return the review return review