def __init__(self, name): self.name = name self.Pdesc_Qtext = A.Compare2SingleVectors(p_featurename="p_descvec", cosine_sim_fraction=0.6, name="") self.Ptitle_Qtext = A.Compare2SingleVectors(p_featurename="p_titlevec", cosine_sim_fraction=0.6, name="")
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="")
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_PkeywordsQkeywords(): cosine_sim_thresholds = [0.5, 0.60, 0.70, 0.80, 0.90] actions = [] for sim_threshold in cosine_sim_thresholds: actions.append( A.Compare2Lists(p_featurename="p_kwsVectors", cosine_sim_fraction=sim_threshold, name="P_kwsVectors_Q_kwsVectors_" + str(sim_threshold))) return actions
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
def init_actions_compare_PtitleQtext(): cosine_sim_thresholds = [ 0.5, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95 ] actions = [] for sim_threshold in cosine_sim_thresholds: actions.append( A.Compare2SingleVectors(p_featurename="p_titlevec", cosine_sim_fraction=sim_threshold, name="P_titlevec_Q_questionVec_" + str(sim_threshold))) return actions