示例#1
0
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
示例#2
0
文件: algo.py 项目: smaccer7/fawkes
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
示例#3
0
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
示例#4
0
文件: algo.py 项目: smaccer7/fawkes
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