def __init__(self, name):
     self.name = name
     self.Pcategories_Qtext = A.CompareListToVector(
         p_featurename="p_mdcategories", cosine_sim_fraction=0.6, name="")
     self.Pkeywords_Qtext = A.CompareListToVector(
         p_featurename="p_kwsVectors", cosine_sim_fraction=0.6, name="")
     self.Pkeywords_Qkeywords = A.Compare2Lists(
         p_featurename="p_kwsVectors", cosine_sim_fraction=0.6, name="")
     self.Pcategories_Qkeywords = A.Compare2Lists(
         p_featurename="p_mdcategories", cosine_sim_fraction=0.6, name="")
示例#2
0
 def __init__(self, name):
     self.name = name
     self.Pdesc_Qtext = A.Compare2SingleVectors(p_featurename="p_descvec",
                                                cosine_sim_fraction=0.8,
                                                name="")
     self.Ptitle_Qtext = A.Compare2SingleVectors(p_featurename="p_titlevec",
                                                 cosine_sim_fraction=0.9,
                                                 name="")
     self.Pcategories_Qtext = A.CompareListToVector(
         p_featurename="p_mdcategories", cosine_sim_fraction=0.5, name="")
     self.Pkeywords_Qtext = A.CompareListToVector(
         p_featurename="p_kwsVectors", cosine_sim_fraction=0.5, name="")
def init_actions_compare_PcategoriesQtext():
    cosine_sim_thresholds = [0.5, 0.60, 0.70, 0.80, 0.90]
    actions = []
    for sim_threshold in cosine_sim_thresholds:
        actions.append(
            A.CompareListToVector(p_featurename="p_mdcategories",
                                  cosine_sim_fraction=sim_threshold,
                                  name="P_mdcategories_Q_questionVec_" +
                                  str(sim_threshold)))
    return actions